2 messages in net.java.dev.jna.usersRe: [jna-users] pointer question
FromSent OnAttachments
duschhaubeSep 3, 2008 3:46 am 
Timothy WallSep 3, 2008 5:21 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [jna-users] pointer questionActions...
From:Timothy Wall (twal@dev.java.net)
Date:Sep 3, 2008 5:21:52 am
List:net.java.dev.jna.users

Make sure you're using the correct calling convention (if you're using stdcall, use StdCallLibrary instead of Library).

Set jna.protected=true or look at the JVM stack dump to see exactly where it crashes.

On Sep 3, 2008, at 6:47 AM, duschhaube wrote:

Hello,

i try to use jna to call the following function in a dll: DllExport SXMPFiles* XMPFiles_Construct1() { SXMPFiles* pXmpFiles = new SXMPFiles(); return pXmpFiles; }

i have tried to do it this way: public class SXMPFiles extends PointerType { }

public interface XMPFiles extends Library { XMPFiles INSTANCE = (XMPFiles) Native.loadLibrary("D:/workspaces/ cx30/xmpTest/lib/XmpToolkit.dll", XMPFiles.class); SXMPFiles XMPFiles_Construct1(); }

but the vm crashes.

can anyone tell me how to do this??

kind regards.