[Winpcap-users] WINPCAP issue with Microsoft C# (VS 2005)
Gianluca Varenni
gianluca.varenni at cacetech.com
Thu Apr 13 14:42:47 GMT 2006
Cool!
Since you studied these interop issues a bit, why don't you write down a FAQ on it. I would be very happy to add it to the WinPcap FAQs.
Have a nice day
GV
----- Original Message -----
From: Chris Boebel
To: winpcap-users at winpcap.org
Sent: Wednesday, April 12, 2006 4:43 AM
Subject: Re: [Winpcap-users] WINPCAP issue with Microsoft C# (VS 2005)
GV -
Actually, after reading the article I read the responses on the associated message board. It turns out that this has been solved with .net 2.0 (I'm using VS 2005).
If you use this before the delegate declaration, everything works correctly. I grabbed several thousand packets using pcap_dispatch / callback without any trouble.
[
UnmanagedFunctionPointer(CallingConvention.Cdecl)]
Thank you for leading me in the right direction!
Chris
On 4/12/06, Gianluca Varenni <gianluca.varenni at cacetech.com> wrote:
Chris,
my suspect is that the calling convention of the delegate that you pass to pcap_loop or pcap_dispatch is wrong. As a consequence, on return from the first call to the callback/delegate, the stack becomes somewhat corrupted, causing the problems you are seeing.
------------------------------------------------------------------------------
_______________________________________________
Winpcap-users mailing list
Winpcap-users at winpcap.org
https://www.winpcap.org/mailman/listinfo/winpcap-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winpcap.org/pipermail/winpcap-users/attachments/20060413/2fa20291/attachment.htm
More information about the Winpcap-users
mailing list