Microsoft Virsual gets the list of devices
The process of the experiment:
1. Open Microsoft Visual Studio 2010, click "File"-- "New"-- "Project", select "MFC Application" and set the project name.
2. Set the prompt on the interface-open the "toolbox" and select "combo box" to resize.
3. Delete C:\ Program Files (x86)\ Microsoft Visual Studio 10.0\ VC\ bin\ cvtres.exe, then run it, and the generated window will pop up.
4. Click the "class view" on the right side of the software-- select "C***Dlg", double-click-select the "OnInitDialod ()" function, and double-click.
5. Click "Project-- > * * attributes (alt+F7) configuration Properties-- > inventory tool-- > input and output-- > embed list-- > No"
6. "Project-- > * * attributes (alt+F7) configuration Properties-- > Cmax Cleavage colors-- > General-- > additional inclusion directories-- > include folder"
7. "Project-- > * * Properties (alt+F7) configuration Properties-- > Linker-- > General-- > additional Library Directory-- > lib folder"
8. "Project-- > * * attributes (alt+F7) configuration properties-- > linker-- > input-- > additional dependencies-- > supplement'; Packet.lib;wpcap.lib'"
9. "Project-- > * * attribute (alt+F7) configuration property-- > CumberCraft color-- > preprocessor-- > preprocessor definition-- > supplement'; HAVE_REMOTE'"
10. Copy the code to get the device list in "/ / TODO: add additional initialization code here" and add the header file
11. change the contents of the file
Change to
12. Click the "View Interface" box, right-click, select add variable, fill in the variable name and click OK.
13. Run