In general, the first thing to write a WinPcap-based application is to get a list of connected network adapters. Both Libpcap and WinPcap provide the PCAP_FINDALLDEVS_EX () function to implement this function: This function returns a list of pcap_if structures, each of which contains the details of an adapter. It is important to note that the data field name and description represent an adapter name and a description that people can understand.
The first step is to change the project-project Properties-Configuration Properties-connector-list file-embed list to "no". If it doesn't solve the problem, go to the second step.
Step Two: Check if the computer is a 64bit operating system, if so, continue with the following actions.
Find out if there are two cvtres.exe.
C:\Program Files (x86) \microsoft Visual Studio 10.0\vc\bin\cvtres.exe
C:\Windows\Microsoft.NET\Framework\v4.0.30319\cvtres.exe
Right-click Properties-Details, view both version numbers, delete/rename older versions, or reset the path variable.
The root of the solution is the second step, after removing the old version of Cvtres.exe, you do not need to set the configuration every time.
For example: Del C:\Program Files (x86) \microsoft Visual Studio 10.0\vc\bin\cvtres.exe
Modified into
for (d= Alldevs; d! = NULL; d= d->next)
{
printf ("%d.%s", ++i, D->name);
if (d->description)
M_combobox.addstring (CString (d->description));
}
WinPcap (b)