crt: Check for NULL handle returned from wide WinAPI functions

On Win9x wide WinAPI functions return NULL handle (0) to indicate error
that function failed, instead of INVALID_HANDLE_VALUE handle (-1).

Signed-off-by: LIU Hao <lh_mouse@126.com>
3 files changed