|
-
November 24th, 2002, 08:25 AM
#1
CreateThread and Winsock Question
I was looking at the Winsock FAQ (http://tangentsoft.net/wskfaq/) and they had an example for a simple multi threaded server. I complied it and it worked fine. I then made a new project and made a threaded server class, CServer. When I compiled it the line
CreateThread(0, 0, EchoHandler, (void*)sd, 0, &nThreadID);
generated the error
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
the prototype for the function is
DWORD WINAPI CServer::EchoHandler(void* sd_)
its the exact same as in the example except for the 'CServer::' does anyone have any ideas why this won't work? Thanks in advance
James
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
|