Philipp Kursawe
2010-02-23 11:19:58 UTC
Hello,
I am still struggling with
HANDLE INVALID_HANDLE_VALUE = new HANDLE(Pointer.createConstant(0xffffffff));
It turns out as:
this W32API$HANDLE (id=185)
immutable true
pointer Pointer$Opaque (id=1499) ***@0xffffffffffffffff
however the toString() of INVALID_HANDLE_VALUE displays:
com.sun.jna.examples.win32.W32API$***@fffffffe
And a HANDLE value returned from CreateFile is:
o W32API$HANDLE (id=165)
immutable false
pointer Pointer (id=1497)
peer 4294967295
toString() = com.sun.jna.examples.win32.W32API$***@ffffffff
Whats going on here? That way its just not possible to use
INVALID_HANDLE_VALUE.equals(CreateFile(...));
Running on Windows 32bit.
Phil
I am still struggling with
HANDLE INVALID_HANDLE_VALUE = new HANDLE(Pointer.createConstant(0xffffffff));
It turns out as:
this W32API$HANDLE (id=185)
immutable true
pointer Pointer$Opaque (id=1499) ***@0xffffffffffffffff
however the toString() of INVALID_HANDLE_VALUE displays:
com.sun.jna.examples.win32.W32API$***@fffffffe
And a HANDLE value returned from CreateFile is:
o W32API$HANDLE (id=165)
immutable false
pointer Pointer (id=1497)
peer 4294967295
toString() = com.sun.jna.examples.win32.W32API$***@ffffffff
Whats going on here? That way its just not possible to use
INVALID_HANDLE_VALUE.equals(CreateFile(...));
Running on Windows 32bit.
Phil