3 messages in net.java.dev.jna.usersRe: [jna-users] java method signatur...
FromSent OnAttachments
SriOct 18, 2007 3:43 pm 
Timothy WallOct 18, 2007 4:48 pm 
SriOct 19, 2007 3:06 pm 
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] java method signature for native methodActions...
From:Timothy Wall (twal@dev.java.net)
Date:Oct 18, 2007 4:48:05 pm
List:net.java.dev.jna.users

a) the name will be mangled however C# mangles names. there were several suggestions on how to definitively find the resulting name.

b) JNA translates Java types to C primitive types, strings and structures. It does *not* translate Java types to C# types, not "string", not "byte[]", not "out int" (well, maybe the last one).

c) even if you do translate all of these, you still have to concern yourself with proper initialization of the MS CLR (basically the VM for C#) and ensure the called method has the right context.

There are some products out there that provide Java/.NET interop, but JNA is not one of them.

On Oct 18, 2007, at 6:43 PM, Sri wrote:

I am using a 3rd party managed .dll file.

native method(c#) signature: ------------------------ public int GetTimings(string timings, byte[] intem, out int outTemp);

can any one tell me what the java signature for this method would be?

I have tried public int GetTimings(String timings, byte[] intem, int outTemp); but it says it can not find the function.

Any help would be appreciated.