This is the mail archive of the
cygwin-patches@cygwin.com
mailing list for the Cygwin project.
Re: Cleaning up for NULL handles
- From: Christopher Faylor <cgf at redhat dot com>
- To: cygwin-patches at cygwin dot com
- Date: Sat, 21 Sep 2002 21:58:28 -0400
- Subject: Re: Cleaning up for NULL handles
- References: <3.0.5.32.20020920192828.0080c640@mail.attbi.com>
- Reply-to: cygwin-patches at cygwin dot com
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