[Winpcap-users] error while compiling programmes in visual studio.net

ashish yadav ashish_frnds at yahoo.co.in
Tue Feb 7 05:22:20 GMT 2006


hi Gianluca..
  sorry for replying soo late..had exams..
  so the code i was using was actually the example given in documentation of winpcap.
  and also the problems regarding pcap_if_src_string not identified and others like this were solved when i used remote-ext.h header file...
  anyway there was a runtime exception....which i couldn't understand hope u can help..
  here is the code i was using..>>>
   
  #include "pcap.h"
#include <remote-ext.h>
main()
{
    pcap_if_t *alldevs;
    pcap_if_t *d;
    int i=0;
    char errbuf[PCAP_ERRBUF_SIZE];
    
    /* Retrieve the device list from the local machine */
    if (pcap_findalldevs_ex(PCAP_SRC_IF_STRING, NULL /* auth is not needed */, &alldevs, errbuf) == -1)
    {
        fprintf(stderr,"Error in pcap_findalldevs_ex: %s\n", errbuf);
        exit(1);
    }
    
    /* Print the list */
    for(d= alldevs; d != NULL; d= d->next)
    {
        printf("%d. %s", ++i, d->name);
        if (d->description)
            printf(" (%s)\n", d->description);
        else
            printf(" (No description available)\n");
    }
    
    if (i == 0)
    {
        printf("\nNo interfaces found! Make sure WinPcap is installed.\n");
        return;
    }

    /* We don't need any more the device list. Free it */
    pcap_freealldevs(alldevs);
}

   
  and the error i got was..
  typeload.exception..
  could not load pcap assembly from netmonui(that's the name of my project)..
  if u need any more details jus tell me,,...
  take care..
  ashish

				
---------------------------------
 Jiyo cricket on Yahoo! India cricket
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winpcap.org/pipermail/winpcap-users/attachments/20060207/f1330cfd/attachment.htm


More information about the Winpcap-users mailing list