<div>Hi Joe,</div> <div> </div> <div>You are trying to use C function in C++. Declare it as extern "C" in your header file</div> <div> </div> <div>Sample code</div> <div> </div><FONT color=#0000ff size=2> <div>#ifdef</FONT><FONT size=2> __cplusplus</div></FONT><FONT color=#0000ff size=2> <div>extern</FONT><FONT size=2> "C" {</div></FONT><FONT color=#0000ff size=2> <div>#endif</div> <div> </div> <DIV><FONT color=#212143> DWORD WINAPI do_pktcapt_loop(LPVOID lp);</FONT></DIV></FONT> <div> </div><FONT color=#0000ff size=2> <div>#ifdef</FONT><FONT size=2> __cplusplus</div> <div>}</div></FONT><FONT color=#0000ff size=2> <div>#endif</div></FONT> <div><BR>Best Wishes</div> <div>Ravi</div> <div><BR><B><I>joe kibz <chikabanga2005@yahoo.com></I></B> wrote:</div> <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid"> <DIV>The Code:</DIV> <DIV> </DIV> <DIV>The
application : dialog based MFC</DIV> <DIV> </DIV> <DIV>The decalaration:</DIV> <DIV>DWORD WINAPI do_pktcapt_loop(LPVOID lp){ //is the thread method}</DIV> <DIV> </DIV> <DIV>The Problem:</DIV> <DIV> </DIV> <DIV>handleThread = CreateThread(NULL, 0 , do_pktcapt_loop, &arg, 0, &dw);</DIV> <DIV>i'm getting an error :</DIV> <DIV>error C2664: 'CreateThread' : cannot convert parameter 3 from 'unsigned long (void *)' to 'unsigned long (__stdcall *)(void *)'<BR></DIV> <DIV>What's the problem with my declaration ???</DIV> <DIV> </DIV> <div> <HR SIZE=1> How low will we go? Check out Yahoo! Messenger’s low <A href="http://us.rd.yahoo.com/mail_us/taglines/postman8/*http://us.rd.yahoo.com/evt=39663/*http://voice.yahoo.com">PC-to-Phone call rates._______________________________________________<BR>Winpcap-users mailing list<BR>Winpcap-users@winpcap.org<BR>https://www.winpcap.org/mailman/listinfo/winpcap-users<BR></BLOCKQUOTE><BR></A><p>
                <hr size=1>How low will we go? Check out Yahoo! Messenger’s low <a href="http://us.rd.yahoo.com/mail_us/taglines/postman8/*http://us.rd.yahoo.com/evt=39663/*http://voice.yahoo.com"> PC-to-Phone call rates.