In 32-bit Windows, does it matter if you use signed (LONG) or unsigned (DWORD) integer variables to store handles?
Announcement
Collapse
No announcement yet.
Handles
Collapse
X
-
-
The only time you might get in trouble using a DWORD is when an API function can return %INVALID_HANDLE_VALUE, which the WIN32API.INC file defines as negative one. If you use a DWORD for a variable that contains a handle and Windows assigns INVALID_HANDLE_VALUE to it, it will appear to your program to be %MAXDWORD (positive 4.2 billion) instead of negative one.
-- Eric
-------------
Perfect Sync: Perfect Sync Development Tools
Email: mailto:[email protected][email protected]</A>
"Not my circus, not my monkeys."
Comment
Comment