You should be able to simply define the interface as a varargs method
and everything else should work properly.
int VixJob_Wait(int jobHandle, int firstPropertyID, ...);
Of course, you'll need to use Java 1.5 for varargs support.
Otherwise you can call the Function object directly, passing an Object
[] for the arguments, which all get pushed to the stack in an
appropriate manner.
Be sure to represent any NULL-valued pointers with 'null', not '0'.
On Sep 27, 2007, at 10:57 AM, step...@one-dash.com wrote:
Here is one of the critical methods I need to call:
/*
* Synchronization functions
* (used to detect when an asynch operation completes).
*/
VixError VixJob_Wait(VixHandle jobHandle,
VixPropertyID firstPropertyID,
...);
All of these typedefs are for int's... so this is realy
int VixJob_Wait(int jobHandle,
int firstPropertyID,
...);
Now for the fun...
You call this method passing a series of pairs of value, pointer
terminated with a single 0... e.g.
int hostHandle;
err = VixJob_Wait(jobHandle, 3010, &hostHandle, 0);
or
int handle;
char buf[2048];
err = VixJob_Wait(jobHandle, 3010, &hostHandle, 3005, buf, 0);
How do I implement this with JNA... or is it Sorry Out Of Luck