|
-
Jan 7th, 2003, 08:32 PM
#1
Thread Starter
Hyperactive Member
CreateThread compile error
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.
I know a lot oF Vb, expert in C++, and i think in assembly.
MSVC++6.NET
vb6
masm
Windowz Xp
I find my self using this a lot in C++
__asm {
}
-
Jan 8th, 2003, 04:43 AM
#2
The thread entry point needs a void * parameter.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|