[prev in list] [next in list] [prev in thread] [next in thread] 

List:       winpcap-users
Subject:    Re: [Winpcap-users] [4.0.2]pcap_handler calling convention
From:       "Gianluca Varenni" <gianluca.varenni () cacetech ! com>
Date:       2008-07-11 15:48:02
Message-ID: 037501c8e36d$80a3ad90$1a4da8c0 () NELSON2
[Download RAW message or body]

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@gmail.com>
To: <winpcap-users@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@winpcap.org
> https://www.winpcap.org/mailman/listinfo/winpcap-users 

_______________________________________________
Winpcap-users mailing list
Winpcap-users@winpcap.org
https://www.winpcap.org/mailman/listinfo/winpcap-users
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic