[Winpcap-users] library calling convention

Chris Morgan chmorgan at gmail.com
Sun Jan 30 12:30:31 PST 2011


Anyone?

Chris



On Fri, Jan 28, 2011 at 10:28 AM, Chris Morgan <chmorgan at gmail.com> wrote:
> Hello.
>
> I'm the developer of sharppcap, a .net wrapper to libpcap/winpcap.
>
> One user has reported seeing issues when calling any winpcap
> functions. The error points to an issue on the sharppcap side related
> to the calling convention being used. I can't reproduce these issues
> here.
>
> Currently the calling convention of the pcap_dispatch() callback is
> flagged as cdecl but I don't believe I've specified the same on the
> rest of the api. The user also says that specifying cdecl for all
> functions resolves the issue, a PInvokeStackImbalance exception.
>
> While it was my understanding that windows api used stdcall, linux
> uses cdecl, I can't figure out how to determine the calling convention
> used by winpcap functions and was hoping someone could help to fill in
> the blanks. The other interesting question that I have is why I'm not
> seeing any issues with Win7 64bit, not sure what specific os
> configuration this user is using.
>
> Chris
>


More information about the Winpcap-users mailing list