19 messages in net.java.dev.jna.usersRe: [jna-users] help c prototype to jni
FromSent OnAttachments
Thomas EneboNov 26, 2007 11:00 am 
Timothy WallNov 26, 2007 1:07 pm 
Timothy WallNov 26, 2007 1:58 pm 
Thomas E EneboNov 27, 2007 8:36 am 
Timothy WallNov 27, 2007 9:16 am 
Glick, Gene (GE Indust, Security)Nov 27, 2007 12:45 pm 
Stephen ConnollyNov 27, 2007 3:18 pm 
Glick, Gene (GE Indust, Security)Nov 28, 2007 6:16 am 
Timothy WallNov 28, 2007 9:15 am 
Glick, Gene (GE Indust, Security)Nov 28, 2007 11:37 am 
Glick, Gene (GE Indust, Security)Nov 28, 2007 11:59 am 
Glick, Gene (GE Indust, Security)Nov 28, 2007 12:05 pm 
Timothy WallNov 28, 2007 12:05 pm 
Wayne MeissnerNov 28, 2007 7:59 pm 
Glick, Gene (GE Indust, Security)Nov 29, 2007 6:43 am 
Nikolas LotzNov 29, 2007 7:41 am 
Glick, Gene (GE Indust, Security)Nov 30, 2007 9:05 am 
Timothy WallNov 30, 2007 11:13 am 
Glick, Gene (GE Indust, Security)Nov 30, 2007 11:56 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] help c prototype to jniActions...
From:Timothy Wall (twal@dev.java.net)
Date:Nov 28, 2007 9:15:16 am
List:net.java.dev.jna.users

While Pointer will work, as Stephen said "int[]" would be a more precise mapping (and less error-prone).

Pointer should generally be used as a last resort, or where a "void*" is representing an opaque object. typedef'd pointers are better represented by a subclass of PointerType.

On Nov 28, 2007, at 9:16 AM, Glick, Gene (GE Indust, Security) wrote:

After posting my question, the answer, I think, came to me. In JNA style it should be

int someFunct(Pointer bob);

I'm converting a C header file to JNA. It contains the prototypes and structures for a .dll file,

-----Original Message----- From: Stephen Connolly [mailto:step@gmail.com] Sent: Tuesday, November 27, 2007 6:18 PM To: use@jna.dev.java.net Subject: Re: [jna-users] help c prototype to jni

If that's really C then it's equivalent to

int someFunct(int bob[]);

which is the same as

int somFunct(int *bob);

On Nov 27, 2007 8:46 PM, Glick, Gene (GE Indust, Security) < gene@ge.com> wrote: how does the following line of C convert to jna?

int someFunct(int bob[4]);

thanks in advance

gene