Removed incorrect checks for INVALID_HANDLE_VALUE

Relevant article:
http://blogs.msdn.com/b/oldnewthing/archive/2004/03/02/82639.aspx