Austin English austinenglish@gmail.com wrote:
alarmThread = CreateThread(NULL, 0, alarmThreadMain, (void *) 20000, 0, &alarmThreadId);
- ok(alarmThread != INVALID_HANDLE_VALUE, "CreateThread\n");
CreateThread doesn't return INVALID_HANDLE_VALUE on failure. Clarifying the error message and printing last error (in decimal) would be better.
On Sat, May 22, 2010 at 2:17 AM, Dmitry Timoshkov dmitry@codeweavers.com wrote:
Austin English austinenglish@gmail.com wrote:
alarmThread = CreateThread(NULL, 0, alarmThreadMain, (void *) 20000, 0, &alarmThreadId);
- ok(alarmThread != INVALID_HANDLE_VALUE, "CreateThread\n");
CreateThread doesn't return INVALID_HANDLE_VALUE on failure. Clarifying the error message and printing last error (in decimal) would be better.
I got that information from the server tests that followed it:
/* Try server #1 */ serverThread = CreateThread(NULL, 0, serverThreadMain1, (void *)8, 0, &serverThreadId); ok(serverThread != INVALID_HANDLE_VALUE, "CreateThread\n"); exercizeServer(PIPENAME "serverThreadMain1", serverThread);
/* Try server #2 */ serverThread = CreateThread(NULL, 0, serverThreadMain2, 0, 0, &serverThreadId); ok(serverThread != INVALID_HANDLE_VALUE, "CreateThread\n"); exercizeServer(PIPENAME "serverThreadMain2", serverThread);
/* Try server #3 */ serverThread = CreateThread(NULL, 0, serverThreadMain3, 0, 0, &serverThreadId); ok(serverThread != INVALID_HANDLE_VALUE, "CreateThread\n"); exercizeServer(PIPENAME "serverThreadMain3", serverThread);
/* Try server #4 */ serverThread = CreateThread(NULL, 0, serverThreadMain4, 0, 0, &serverThreadId); ok(serverThread != INVALID_HANDLE_VALUE, "CreateThread\n"); exercizeServer(PIPENAME "serverThreadMain4", serverThread);
I've resent the patch with the alarmThread and serverThread cases fixed. Thanks for the review!