i found some interesting thing.<br><br>if i call <br><br>    if(pcap_findalldevs(&amp;alldevs, errbuf) == -1)<br>    {<br>        fprintf(stderr,&quot;Error in pcap_findalldevs: %s\n&quot;, errbuf);<br>        exit(1);<br>
    }<br><br>from my dialog&#39;s code its returns 3 adapters:<br>1: adapter for generic dialup and vpn capture<br>2. my ethernet interface<br>3. my wifi interface<br><br>but if i call that function from thread, that is runs by next function:<br>
<br>CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)THREAD, CWnd::m_hWnd, THREAD_PRIORITY_HIGHEST, &amp;dwID[0]);<br><br>it returns only 2 adapters, ethernet and wifi, no generic.<br>i had that problem a few years ago, but didn&#39;t get it was messed with threads, so i just looked for string &#39;generic&#39; in adapter&#39;s name and skipped it.<br>
<br>now i did it the other way, just called pcap_findalldevs before creating thread and put result in global variable alldevs so thread see all 3 adapters. <br>