The Windows HANDLE type, despite being a `void *', does not actually
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Tue, 29 Aug 2006 18:32:44 +0000 (18:32 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Tue, 29 Aug 2006 18:32:44 +0000 (18:32 +0000)
commit4a0b6d6164ce80aa9c7b160080e2995eec2fa2ce
tree456266e7c69026cc25f759057eb1ba338a27934e
parent45ef7ce3a7bb275f8550a07cc752fa272fe07eac
The Windows HANDLE type, despite being a `void *', does not actually
behave like a pointer. In particular, the right thing to set a
HANDLE to to indicate that it's invalid is INVALID_HANDLE_VALUE, not
NULL. Crack down on sloppy use of NULL HANDLEs across all Windows
code.

(There is one oddity, which is that {Create,Open}FileMapping are
documented to return a NULL HANDLE instead of INVALID_HANDLE_VALUE
on failure. Shrug. If MS want to be inconsistent, I suppose I have
to live with it.)

git-svn-id: svn://svn.tartarus.org/sgt/putty@6833 cda61777-01e9-0310-a592-d414129be87e
windows/window.c
windows/winpgntc.c
windows/winser.c
windows/winsftp.c