Announcement

Collapse
No announcement yet.

Handles

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Handles

    In 32-bit Windows, does it matter if you use signed (LONG) or unsigned (DWORD) integer variables to store handles?
    If you try to make something idiot-proof, someone will invent a better idiot.

  • #2
    No.

    --Dave


    -------------
    PowerBASIC Support
    mailto:[email protected][email protected]</A>

    Home of the BASIC Gurus
    www.basicguru.com

    Comment


    • #3
      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

      Working...
      X