Cmdr0Sunburn
Jan 7th, 2003, 07:32 PM
hi when i use
CreateThread(0,0, Client, 0, 0,&lpThreadID3);
on
DWORD WINAPI Client(void)
{
theClient = accept(hSocket,NULL,NULL);
if (theClient == INVALID_SOCKET) {
printf("Error at accept()");
WSACleanup();
return 0;
}
}
i get this error in msvc++, im even following an example from msdn. can you help me?
F:\C++\newprojects\Winsck\Server\Servermain.cpp(62) : error C2664: 'CreateThread' : cannot convert parameter 3 from 'unsigned long (void)' to 'unsigned long (__stdcall *)(void *)'
None of the functions with this name in scope match the target type.
CreateThread(0,0, Client, 0, 0,&lpThreadID3);
on
DWORD WINAPI Client(void)
{
theClient = accept(hSocket,NULL,NULL);
if (theClient == INVALID_SOCKET) {
printf("Error at accept()");
WSACleanup();
return 0;
}
}
i get this error in msvc++, im even following an example from msdn. can you help me?
F:\C++\newprojects\Winsck\Server\Servermain.cpp(62) : error C2664: 'CreateThread' : cannot convert parameter 3 from 'unsigned long (void)' to 'unsigned long (__stdcall *)(void *)'
None of the functions with this name in scope match the target type.