[Winpcap-users] Re: thread error
Ravi Sankar
s_rsy at yahoo.com
Tue May 16 10:08:34 GMT 2006
Hi Joe,
You are trying to use C function in C++. Declare it as extern "C" in your header file
Sample code
#ifdef __cplusplus
extern "C" {
#endif
DWORD WINAPI do_pktcapt_loop(LPVOID lp);
#ifdef __cplusplus
}
#endif
Best Wishes
Ravi
joe kibz <chikabanga2005 at yahoo.com> wrote:
The Code:
The application : dialog based MFC
The decalaration:
DWORD WINAPI do_pktcapt_loop(LPVOID lp){ //is the thread method}
The Problem:
handleThread = CreateThread(NULL, 0 , do_pktcapt_loop, &arg, 0, &dw);
i'm getting an error :
error C2664: 'CreateThread' : cannot convert parameter 3 from 'unsigned long (void *)' to 'unsigned long (__stdcall *)(void *)'
What's the problem with my declaration ???
---------------------------------
How low will we go? Check out Yahoo! Messengers low PC-to-Phone call rates._______________________________________________
Winpcap-users mailing list
Winpcap-users at winpcap.org
https://www.winpcap.org/mailman/listinfo/winpcap-users
---------------------------------
How low will we go? Check out Yahoo! Messengers low PC-to-Phone call rates.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winpcap.org/pipermail/winpcap-users/attachments/20060516/6997e87b/attachment.htm
More information about the Winpcap-users
mailing list