[Winpcap-users] [4.0.2]pcap_handler calling convention

Gianluca Varenni gianluca.varenni at cacetech.com
Fri Jul 11 15:48:02 GMT 2008


More than changing the calling convention from __cdecl to __stdcall (which 
is a breaking change), it should be documented somewhere that the callback 
must use the __cdecl calling convention. Or maybe providing a macro like 
PCAP_CALLBACK_CALLCONV.

Have a nice day
GV

----- Original Message ----- 
From: "Marco Perrando" <marco.perrando at gmail.com>
To: <winpcap-users at winpcap.org>
Sent: Friday, July 11, 2008 5:25 AM
Subject: [Winpcap-users] [4.0.2]pcap_handler calling convention


> Hi!
> I am working on a piece of software that uses the winpcap dlls.
> I was having some troubles. In short words, these were related to the
> calling convention of the pcap_handler callback.
>
> This callback uses the __cdecl calling convention (the default for c 
> code).
>
> Now I have overcome the problem by declaring in my framework the
> callback with the __cdecl calling convention, but IMHO it should be
> annotated with the c-macro CALLBACK (that implies the __stdcall)
> because it is visible to the dll users.
>
> Regards,
>
> Marco.
> _______________________________________________
> Winpcap-users mailing list
> Winpcap-users at winpcap.org
> https://www.winpcap.org/mailman/listinfo/winpcap-users 



More information about the Winpcap-users mailing list