[Winpcap-users] Application fails first open with winpcap

matt jaffa mjaffa at gmail.com
Fri Mar 31 17:36:08 GMT 2006


Hi,

So our application will open and close when we use it the first time after a
reboot. But if we open it twice the 2nd time it succeeds and everything is
fine. If we open ethereal and close it and then open our application
everything is fine too. Is there something we are not doing to initialize
winpcap?

Thanks


pcap_if_t *alldevs;

pcap_if_t *d;

int i=0;

char errbuf[PCAP_ERRBUF_SIZE];

if(pcap_findalldevs(&alldevs, errbuf) == -1)

{

fprintf(stderr,"Error in pcap_findalldevs: %s\n", errbuf);

return;

}

for(d=alldevs; d; d=d->next)

{

char *deviceName = strdup(d->name);

CreateThread(NULL, 0, &StartRoutine, deviceName, 0, NULL);

}

pcap_freealldevs(alldevs);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winpcap.org/pipermail/winpcap-users/attachments/20060331/ed4a80ee/attachment.htm


More information about the Winpcap-users mailing list