[Winpcap-users] pcap_dumper_t unable to load
Gianluca Varenni
gianluca.varenni at cacetech.com
Wed Apr 26 03:53:10 GMT 2006
You are creating a Managed c++ applications.
There is a known issue with forward declarations of some types in the pcap
include files that cause this exception.
Please refer to this FAQ for more details.
http://www.winpcap.org/misc/faq.htm#Q-29
Hope it helps
GV
----- Original Message -----
From: <amruta.tilaye at yahoo.com (amruta tilaye)>
Sent: Saturday, April 22, 2006 10:29 PM
Subject: [Winpcap-users] pcap_dumper_t unable to load
> Hi guys,
>
> I'm trying to store the packets captured to "savefile" using
> pcap_dump_open and pcap_dump functions. Both these functions use pointer
> to pcap_dumper_t structure called dumpfile.
>
> I'm working in Visual Studio .NET 2003 MFC Console application (.NET).
> And I'm getting following assembly error:
> An unhandled exception of type 'System.TypeLoadException' occurred in
> Unknown Module.
> Additional information: Could not load type pcap_dumper from assembly
> try, Version=1.0.2303.25936, Culture=neutral, PublicKeyToken=null.
>
> The error points to
> mainret = main(argc, argv, envp);
> in crtexe.c file.
>
> This is the related piece of code:
> pcap_dumper_t* dumpfile;
> char* tmpdir;
> .
> .
> tmpdir = strdup(tmpnam(NULL));
> dumpfile =pcap_dump_open(adhandle,"dumpfile"); >>>adhandle is return
> value
>
> >>of pcap_open structure
> if(dumpfile==NULL)
> {
> fprintf(stderr,"\nError opening output file\n");
> return -1;
> }
> .
> .
> pcap_loop(adhandle, 0, packet_handler, (unsigned char *)dumpfile);
> .
> .
> I'm unable to debug this. All other functions work fine. So I guess there
> is no linking error. It's only when I use pcap_dumper_t I'm getting error.
>
>
>
>
> ---------------------------------
> Jiyo cricket on Yahoo! India cricket
> Yahoo! Messenger Mobile Stay in touch with your buddies all the time.
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://www.winpcap.org/pipermail/winpcap-users/attachments/20060422/bdb4a8cc/attachment.htm
More information about the Winpcap-users
mailing list