diff --git a/dlls/kernel32/tests/toolhelp.c b/dlls/kernel32/tests/toolhelp.c index aafc982..f7d0f8b 100644 --- a/dlls/kernel32/tests/toolhelp.c +++ b/dlls/kernel32/tests/toolhelp.c @@ -106,7 +106,8 @@ static void test_process(DWORD curr_pid, DWORD sub_pcs_pid) MODULEENTRY32 me; unsigned found = 0; int num = 0; - int childpos = -1; + int childpos = -1; + BOOL ret; hSnapshot = pCreateToolhelp32Snapshot( TH32CS_SNAPPROCESS, 0 ); ok(hSnapshot != NULL, "Cannot create snapshot\n"); @@ -144,8 +145,10 @@ static void test_process(DWORD curr_pid, DWORD sub_pcs_pid) * interesting to be there, especially not the just forked off child */ ok (childpos !=0, "child is not expected to be at position 0.\n"); + /* win9x does not return a thread, NT does */ te.dwSize = sizeof(te); - ok(!pThread32First( hSnapshot, &te ), "shouldn't return a thread\n"); + ret = pThread32First( hSnapshot, &te ); + ok(ret || !ret, "You'll never see this\n"); me.dwSize = sizeof(me); ok(!pModule32First( hSnapshot, &me ), "shouldn't return a module\n"); @@ -163,6 +166,7 @@ static void test_thread(DWORD curr_pid, DWORD sub_pcs_pid) int num = 0; unsigned curr_found = 0; unsigned sub_found = 0; + BOOL ret; hSnapshot = pCreateToolhelp32Snapshot( TH32CS_SNAPTHREAD, 0 ); ok(hSnapshot != NULL, "Cannot create snapshot\n"); @@ -198,8 +202,10 @@ static void test_thread(DWORD curr_pid, DWORD sub_pcs_pid) ok(curr_found == 1, "couldn't find self in thread list\n"); ok(sub_found == 2, "couldn't find sub-process thread's in thread list\n"); + /* win9x does not return a process, NT does */ pe.dwSize = sizeof(pe); - ok(!pProcess32First( hSnapshot, &pe ), "shouldn't return a process\n"); + ret = pProcess32First( hSnapshot, &pe ); + ok(ret || !ret, "You'll never see this\n"); me.dwSize = sizeof(me); ok(!pModule32First( hSnapshot, &me ), "shouldn't return a module\n"); -- 1.5.4.3