<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2802" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>Cool!</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>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.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Have a nice day</FONT></DIV>
<DIV><FONT size=2>GV</FONT></DIV>
<DIV> </DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=cboebel@gmail.com href="mailto:cboebel@gmail.com">Chris Boebel</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=winpcap-users@winpcap.org
href="mailto:winpcap-users@winpcap.org">winpcap-users@winpcap.org</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Wednesday, April 12, 2006 4:43
AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [Winpcap-users] WINPCAP
issue with Microsoft C# (VS 2005)</DIV>
<DIV><FONT size=2></FONT><FONT size=2></FONT><BR></DIV>
<DIV>GV -</DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV>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).</DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV>If you use this before the delegate declaration, everything works
correctly. I grabbed several thousand packets using pcap_dispatch / callback
without any trouble.</DIV>
<DIV> </DIV><FONT size=2>
<P>[</P></FONT><FONT color=#008080 size=2>UnmanagedFunctionPointer</FONT><FONT
size=2>(</FONT><FONT color=#008080 size=2>CallingConvention</FONT><FONT
size=2>.Cdecl)]
<P></P></FONT>
<DIV>Thank you for leading me in the right direction!</DIV>
<DIV> </DIV>
<DIV>Chris</DIV>
<DIV><BR><BR> </DIV>
<DIV><SPAN class=gmail_quote>On 4/12/06, <B class=gmail_sendername>Gianluca
Varenni</B> <<A
href="mailto:gianluca.varenni@cacetech.com">gianluca.varenni@cacetech.com</A>>
wrote:</SPAN>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<DIV style="DIRECTION: ltr">
<DIV><FONT size=2>Chris,</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>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.
</FONT></DIV></DIV></BLOCKQUOTE></DIV>
<P>
<HR>
<P></P>_______________________________________________<BR>Winpcap-users
mailing
list<BR>Winpcap-users@winpcap.org<BR>https://www.winpcap.org/mailman/listinfo/winpcap-users<BR></BLOCKQUOTE></BODY></HTML>