Cleaning up for NULL handles

Christopher Faylor cgf@redhat.com
Sat Sep 21 18:58:00 GMT 2002


On Fri, Sep 20, 2002 at 07:28:28PM -0400, Pierre A. Humblet wrote:
>The patch below takes care of the possibility that CreateFile might
>return a 0 handle, in the area that I touched recently.

I'm pretty sure that CreateFile does not return a NULL handle as there
are Windows API functions that interpret a NULL handle as indicating
a default parameter.

In fact, once such function is CreateFile itself.

So, although the fact that CreateFile will return INVALID_HANDLE_VALUE
on error is documented, I think we can safely assume that CreateFile
will never return a NULL handle either.

cgf



More information about the Cygwin-patches mailing list