1 message in net.java.dev.jna.usersINVALID_HANDLE_VALUE.equals does not ...
FromSent OnAttachments
rzoJun 1, 2008 4:49 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:INVALID_HANDLE_VALUE.equals does not return a correct result on Win32Actions...
From:rzo (rz@gmx.de)
Date:Jun 1, 2008 4:49:03 am
List:net.java.dev.jna.users

Hello,

On Win32 I am calling:

Pointer p = CreateFileA(...);

The debugger shows that p.peer is set to 4294967295 which is FFFFFFFF.

I am defining

INVALID_HANDLE_VALUE = Pointer.createConstant(0xffffffff);

However INVALID_HANDLE_VALUE.equals(p) returns false.

Is this a bug or is my definition of INVALID_HANDLE_VALUE wrong ?

Setting it to createConstant(-1) also returns false.

For createConstant(4294967295) I am getting an error in eclipse: literal of type int is out of range.

- Ron