kernel32: CreateThread returns NULL on error, not INVALID_HANDLE_VALUE.

Misha Koshelev mk144210 at bcm.tmc.edu
Tue Feb 6 08:41:09 CST 2007


Someone pointed this out when I was writing my conformance test, but
there is a place where this check is currently also done incorrectly in
the part of the conformance test that I did not write so I am fixing it
here. Sorry I can't remember who it was right now (Dmitry?).

Changelog:

	* kernel32: CreateThread returns NULL on error, not
INVALID_HANDLE_VALUE.

-------------- next part --------------
From 89f837bb6658e3aeb5c73e968fa85864c05cc6f5 Mon Sep 17 00:00:00 2001
From: Misha Koshelev <mk144210 at bcm.tmc.edu>
Date: Tue, 6 Feb 2007 08:37:07 -0600
Subject: kernel32: CreateThread returns NULL on error, not INVALID_HANDLE_VALUE.
---
 dlls/kernel32/tests/change.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/kernel32/tests/change.c b/dlls/kernel32/tests/change.c
index 0774caf..54bdffa 100644
--- a/dlls/kernel32/tests/change.c
+++ b/dlls/kernel32/tests/change.c
@@ -65,7 +65,7 @@ static HANDLE StartNotificationThread(LP
 
     thread = CreateThread(NULL, 0, NotificationThread, (LPVOID)change,
                           0, &threadId);
-    ok(thread != INVALID_HANDLE_VALUE, "CreateThread error: %d\n", GetLastError());
+    ok(thread != NULL, "CreateThread error: %d\n", GetLastError());
 
     return thread;
 }
-- 
1.4.1



More information about the wine-patches mailing list