[Winpcap-users] URGENTLY NEEDED FOR PROJECT
amruta tilaye
amruta.tilaye at yahoo.com
Mon Apr 24 21:06:09 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/20060424/7b6fed92/attachment.htm
More information about the Winpcap-users
mailing list