----- Original Message ----- From: "Punnoose Roshan" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, October 13, 2004 4:26 PM Subject: [WinPcap-users] Using wpdpack with managed C++
> Hi, > > I want to use Windows Forms in Visual Studio .NET 2003 with wpdpack, but > I get the error: TypeLoadException, Could not load type pcap from > assembly. Is there any way that this can be bypassed? Thanks. Hi. I think that you are encountering a "TypeLoadException in module Unknown". The problem is due to the fact that the standard winpcap include file "pcap.h" contains only a forward declaration of "struct pcap", but not the actual definition of it. As a consequence, the managed c++ compiler does not emit any metadata for that type, since there's no definition for it. There are two solutions to the problem: 1. Include "pcap-int.h" instead of "pcap.h". This include the actual definition for the type "struct pcap" 2. add a fake definition of "struct pcap". The simplest one is "struct pcap{};". Have a nice day GV > > Roshan > > > ================================================================== > This is the WinPcap users list. It is archived at > http://www.mail-archive.com/[EMAIL PROTECTED]/ > > To unsubscribe use > mailto: [EMAIL PROTECTED] > ================================================================== > ================================================================== This is the WinPcap users list. It is archived at http://www.mail-archive.com/[EMAIL PROTECTED]/ To unsubscribe use mailto: [EMAIL PROTECTED] ==================================================================