I don't understand how that will help. I already have a couple HANDLEs..
The API I need to call takes an array of HANDLEs, of length > 1.
Scott
-----Original Message-----
From: Timothy Wall [mailto:twal...@dev.java.net]
There is HANDLEByReference in com.sun.jna.examples.win32.W32API, but
PointerByReference or Pointer[1] will also work.
Arrays of type-mapped types are not currently supported in every case.
On Mar 10, 2009, at 11:47 AM, Scott Palmer wrote:
As the subject indicates, I'm trying to call the Windows
WaitForMultipleObjects method but I get this exception:
java.lang.IllegalArgumentException: Unsupported array argument type:
class ca.digitalrapids.bindings.win32.W32API$HANDLE
at com.sun.jna.Function.convertArgument(Function.java:514)
I was thinking I could work around it by making an array of the
appropriate primitive type (int or long) depending on Pointer.SIZE,
but I there isn't a way to get the native handle value from a HANDLE
object as far as I can tell.
What's the best way to deal with this?
I currently declare the WaitForMultipleObjects method like this:
int WaitForMultipleObjects(int nCount, HANDLE [] handles, boolean
bWaitAll, int dwMilliseconds);
Thanks,