Commit f570fd31 authored by Paul Vriens's avatar Paul Vriens Committed by Alexandre Julliard

ws2_32/tests: Add required parameter to CreateThread (for Win9x and WinME).

parent 34b0161d
...@@ -1356,6 +1356,7 @@ static void test_select(void) ...@@ -1356,6 +1356,7 @@ static void test_select(void)
struct timeval select_timeout; struct timeval select_timeout;
select_thread_params thread_params; select_thread_params thread_params;
HANDLE thread_handle; HANDLE thread_handle;
DWORD id;
fdRead = socket(AF_INET, SOCK_STREAM, 0); fdRead = socket(AF_INET, SOCK_STREAM, 0);
ok( (fdRead != INVALID_SOCKET), "socket failed unexpectedly: %d\n", WSAGetLastError() ); ok( (fdRead != INVALID_SOCKET), "socket failed unexpectedly: %d\n", WSAGetLastError() );
...@@ -1395,7 +1396,7 @@ static void test_select(void) ...@@ -1395,7 +1396,7 @@ static void test_select(void)
thread_params.s = fdRead; thread_params.s = fdRead;
thread_params.ReadKilled = FALSE; thread_params.ReadKilled = FALSE;
server_ready = CreateEventW(NULL, TRUE, FALSE, NULL); server_ready = CreateEventW(NULL, TRUE, FALSE, NULL);
thread_handle = CreateThread (NULL, 0, (LPTHREAD_START_ROUTINE) &SelectReadThread, &thread_params, 0, NULL ); thread_handle = CreateThread (NULL, 0, (LPTHREAD_START_ROUTINE) &SelectReadThread, &thread_params, 0, &id );
ok ( (thread_handle != NULL), "CreateThread failed unexpectedly: %d\n", GetLastError()); ok ( (thread_handle != NULL), "CreateThread failed unexpectedly: %d\n", GetLastError());
WaitForSingleObject (server_ready, INFINITE); WaitForSingleObject (server_ready, INFINITE);
...@@ -1429,6 +1430,7 @@ static void test_accept(void) ...@@ -1429,6 +1430,7 @@ static void test_accept(void)
struct sockaddr_in address; struct sockaddr_in address;
select_thread_params thread_params; select_thread_params thread_params;
HANDLE thread_handle = NULL; HANDLE thread_handle = NULL;
DWORD id;
server_socket = socket(AF_INET, SOCK_STREAM, 0); server_socket = socket(AF_INET, SOCK_STREAM, 0);
if (server_socket == INVALID_SOCKET) if (server_socket == INVALID_SOCKET)
...@@ -1463,7 +1465,7 @@ static void test_accept(void) ...@@ -1463,7 +1465,7 @@ static void test_accept(void)
thread_params.s = server_socket; thread_params.s = server_socket;
thread_params.ReadKilled = FALSE; thread_params.ReadKilled = FALSE;
thread_handle = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE) AcceptKillThread, thread_handle = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE) AcceptKillThread,
&thread_params, 0, NULL); &thread_params, 0, &id);
if (thread_handle == NULL) if (thread_handle == NULL)
{ {
trace("error creating thread: %d\n", GetLastError()); trace("error creating thread: %d\n", GetLastError());
...@@ -1641,6 +1643,7 @@ static void test_send(void) ...@@ -1641,6 +1643,7 @@ static void test_send(void)
const int buflen = 1024*1024; const int buflen = 1024*1024;
char *buffer = NULL; char *buffer = NULL;
int ret; int ret;
DWORD id;
src = socket(AF_INET, SOCK_STREAM, 0); src = socket(AF_INET, SOCK_STREAM, 0);
if (src == INVALID_SOCKET) if (src == INVALID_SOCKET)
...@@ -1696,7 +1699,7 @@ static void test_send(void) ...@@ -1696,7 +1699,7 @@ static void test_send(void)
goto end; goto end;
} }
hThread = CreateThread(NULL, 0, drain_socket_thread, &dst, 0, NULL); hThread = CreateThread(NULL, 0, drain_socket_thread, &dst, 0, &id);
if (hThread == NULL) if (hThread == NULL)
{ {
ok(0, "CreateThread failed, error %d\n", GetLastError()); ok(0, "CreateThread failed, error %d\n", GetLastError());
...@@ -1739,6 +1742,7 @@ static void test_write_events(void) ...@@ -1739,6 +1742,7 @@ static void test_write_events(void)
int len; int len;
u_long one = 1; u_long one = 1;
int ret; int ret;
DWORD id;
src = socket(AF_INET, SOCK_STREAM, 0); src = socket(AF_INET, SOCK_STREAM, 0);
if (src == INVALID_SOCKET) if (src == INVALID_SOCKET)
...@@ -1794,7 +1798,7 @@ static void test_write_events(void) ...@@ -1794,7 +1798,7 @@ static void test_write_events(void)
goto end; goto end;
} }
hThread = CreateThread(NULL, 0, drain_socket_thread, &dst, 0, NULL); hThread = CreateThread(NULL, 0, drain_socket_thread, &dst, 0, &id);
if (hThread == NULL) if (hThread == NULL)
{ {
ok(0, "CreateThread failed, error %d\n", GetLastError()); ok(0, "CreateThread failed, error %d\n", GetLastError());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment