Repository navigation
Conversation
There was a problem hiding this comment.
I can see how this would affect the 32-bit version. In addition, I think all of the _PTR variants should add a .toPointer() method, which further makes clear that their value can be either integer or pointer. rkey.getValue().toPointer() would make this particular expression more clear, and avoid new Pointer(), which implies something different.
There was a problem hiding this comment.
I added toPointer to ULONG_PTR, which does make this much cleaner.
This affects both the 32 and the 64 bit versions. The problem is that the map has HANDLE and the result of GetQueuedCompletionStatus is a ULONG_PTR. So you cannot lookup one by the other. We could add a way to compare a HANDLE to a Pointer transparently, but that's something that seems like an overkill and a possible source of confusion elsewhere.
Doh.
The small change in
ULONG_PTRmakes it unsigned, threw it in there for good measure, it's not substantial for this fix.