[Winpcap-users] Re: error when compiling pcap_loop in MFC[Scanned]

Ian Hawley i.hawley at synectics.co.uk
Mon May 8 09:56:36 GMT 2006


Hi Joe,

 

The __cdecl command informs the compiler to use the C calling convention.  Sometimes the calling convention in your application is different; people like to use factcall instead as (I believe) this uses registers to pass parameters where possible as opposed to __cdecl which I think places parameters on the stack or local heap (off hand I'm not sure!).

 

If your compiler options are set to use fastcall then you it might be they need to be set to __cdecl as winpcap may specify this.  Alternatively you may need to define your loop method with __cdecl to override the compiler's default setting.

 

Additionally, I can't see the whole of your error message and it may simply be that your final argument doesn't quite match the expected argument.  That said, I'd check your calling conventions match!!

 

Hope that helps

Ian

 

   _____  

From: winpcap-users-bounces at winpcap.org [mailto:winpcap-users-bounces at winpcap.org] On Behalf Of joe kibz
Sent: 08 May 2006 10:28
To: winpcap-users at winpcap.org
Subject: [Winpcap-users] Re: error when compiling pcap_loop in MFC[Scanned]

 

 

Problem : when using pcap_loop i keep getting this error ;

 

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
                       ????????

 

What is all that (_cdecl*) error ? and how can i debug it ?

 

 

joe

 

   _____  

Blab-away for as little as 1¢/min. Make HYPERLINK "http://us.rd.yahoo.com/mail_us/taglines/postman2/*http:/us.rd.yahoo.com/evt=39663/*http:/voice.yahoo.com"PC-to-Phone Calls using Yahoo! Messenger with Voice.

--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.392 / Virus Database: 268.5.5/333 - Release Date: 05/05/2006


-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.392 / Virus Database: 268.5.5/333 - Release Date: 05/05/2006
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winpcap.org/pipermail/winpcap-users/attachments/20060508/f66cef1c/attachment.htm


More information about the Winpcap-users mailing list