4 messages in net.java.dev.jna.usersRe: [jna-users] Help mapping VMware V...
FromSent OnAttachments
step...@one-dash.comSep 27, 2007 7:57 am 
Timothy WallSep 27, 2007 8:28 am 
Timothy WallSep 27, 2007 10:13 am 
Stephen ConnollySep 27, 2007 10:44 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 mapping VMware VIX libraries (varargs related)Actions...
From:Timothy Wall (twal@dev.java.net)
Date:Sep 27, 2007 10:13:28 am
List:net.java.dev.jna.users

Integer and int are interchangeable (as are all Object/primitive equivalents). Java 1.5 autoboxing should obviate the need to do "Integer.valueOf(n)".

Whatever arguments go into varargs eventually get stuffed into a single array of Object[], at which point the type information is extracted.

Note that while zero will work as a final argument on 32-bit systems, 'null' will work on 32- and 64-bit, since it is converted to pointer type rather than 32-bit integer.

On Sep 27, 2007, at 11:56 AM, step@one-dash.com wrote:

Will that work even though the type of the args toggles

int, int *, int, int *.

just go

VixJob_Wait(jobHandle, Integer.valueOf(5), IntByReference, Integer.valueOf(7), IntByReference, Integer.valueOf(0));

I ask as the javadoc does not mention using Integers for ints