[Winpcap-users] Application fails first open with winpcap

Gianluca Varenni gianluca.varenni at cacetech.com
Fri Mar 31 18:30:06 GMT 2006


It seems a service dependency problem.

Can you send us a barebone service that I can use for testing? I do know how to create a service, but it requires a bit of time (and I'm really busy in these days). Having a WinPcap service sample that I can easily compile will surely speed up the debugging...

Have a nice day
GV


  ----- Original Message ----- 
  From: matt jaffa 
  To: winpcap-users at winpcap.org 
  Sent: Friday, March 31, 2006 9:36 AM
  Subject: [Winpcap-users] Application fails first open with winpcap


  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);



------------------------------------------------------------------------------


  _______________________________________________
  Winpcap-users mailing list
  Winpcap-users at winpcap.org
  https://www.winpcap.org/mailman/listinfo/winpcap-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winpcap.org/pipermail/winpcap-users/attachments/20060331/4c9ecbf0/attachment.htm


More information about the Winpcap-users mailing list