Re: INVALID_HANDLE_VALUE vs. NULL

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



>From CloseHandle:
This function will throw an exception if either a handle value that is not
valid (or 0)
It implies 0 (NULL) is not valid for any handle closeable by CloseHandle, so
actually all kernel handles, right?


.



Relevant Pages

  • Re: INVALID_HANDLE_VALUE vs. NULL
    ... > This function will throw an exception if either a handle value that is not ... > It implies 0 is not valid for any handle closeable by CloseHandle, ... Prev by Date: ...
    (microsoft.public.win32.programmer.kernel)
  • Re: INVALID_HANDLE_VALUE vs. NULL
    ... This function will throw an exception if either a handle value that is not ... It implies 0 is not valid for any handle closeable by CloseHandle, ... -Software Consultant (Embedded systems and Real Time Controls) ...
    (microsoft.public.win32.programmer.kernel)
  • Re: INVALID_HANDLE_VALUE vs. NULL
    ... Arkady ... > This function will throw an exception if either a handle value that is not ... > It implies 0 is not valid for any handle closeable by CloseHandle, ...
    (microsoft.public.win32.programmer.kernel)
  • Re: INVALID_HANDLE_VALUE vs. NULL
    ... The app raised a exception. ... >> It implies 0 is not valid for any handle closeable by CloseHandle, ... where you find in documentation of CloseHandle that ... > to be thrown, so perhaps that is what the documentation was referring to. ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Exceptions in API
    ... > Functions that release resources should not have failure modes ... Does it mean that CloseHandle always returns true? ... just wanted to report deallocation error to user. ... > a SEH exception instead of returning FALSE. ...
    (microsoft.public.win32.programmer.kernel)