<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2873" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>Joe,</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>you should declare your method as </FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>void __cdecl foo(....), in order to adapt to the calling
convention used by wpcap.dll.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Moreover, I would suggest you to use pcap_next_ex instead of
pcap_loop/pcap_dispatch, they are usually much easier to handle when you need to
terminate your capture thread (I suppose you are using a separate thread for
capturing in your MFC application).</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Have a nice day</FONT></DIV>
<DIV><FONT size=2>GV</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=chikabanga2005@yahoo.com href="mailto:chikabanga2005@yahoo.com">joe
kibz</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=winpcap-users@winpcap.org
href="mailto:winpcap-users@winpcap.org">winpcap-users@winpcap.org</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Monday, May 08, 2006 2:28 AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [Winpcap-users] Re: error when
compiling pcap_loop in MFC</DIV>
<DIV><BR></DIV>
<DIV> </DIV>
<DIV>Problem : when using pcap_loop i keep getting this error ;</DIV>
<DIV> </DIV>
<DIV>C:\joekibz\sniffere\sniffereDlg.cpp(304) : error C2664: 'pcap_loop' :
cannot convert parameter 3 from 'void (unsigned char *,const struct
pcap_pkthdr *,const unsigned char *)' to 'void (__cdecl *)(unsigned char
*,const struct pcap_pkthdr *,const
uns<BR>
????????</DIV>
<DIV> </DIV>
<DIV>What is all that (_cdecl*) error ? and how can i debug it ?</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>joe</DIV>
<DIV> </DIV>
<P>
<HR SIZE=1>
Blab-away for as little as 1¢/min. Make <A
href="http://us.rd.yahoo.com/mail_us/taglines/postman2/*http://us.rd.yahoo.com/evt=39663/*http://voice.yahoo.com">PC-to-Phone
Calls</A> using Yahoo! Messenger with Voice.
<P>
<HR>
<P></P>_______________________________________________<BR>Winpcap-users
mailing
list<BR>Winpcap-users@winpcap.org<BR>https://www.winpcap.org/mailman/listinfo/winpcap-users<BR></BLOCKQUOTE></BODY></HTML>