[Winpcap-users] pcap_dumper_t unable to load
amruta tilaye
amruta.tilaye at yahoo.com
Sat Apr 22 22:29:43 GMT 2006
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