Description: When a USB device is inserted or pop-up, Windows will generate a global message: WM_DEVICECHANGE
We need to do is get this message wParam parameter, if it means that there is DBT_DEVICEARRIVAL device inserted and available,
If there is DBT_DEVICEREMOVECOMPLETE said equipment has been removed. Then view the lParam parameter is DBT_DEVTYP_VOLUME,
You can remove the volume number dbcv_unitmask DEV_BROADCAST_VOLUME structure, you know what the volume is inserted or ejected.
To Search:
File list (Check if you may need any files):
res\USBListening.ico
...\USBListening.rc2
ReadMe.txt
Resource.h
StdAfx.cpp
StdAfx.h
USBListening.aps
USBListening.clw
USBListening.cpp
USBListening.dsp
USBListening.dsw
USBListening.h
USBListening.ncb
USBListening.opt
USBListening.plg
USBListening.rc
USBListeningDlg.cpp
USBListeningDlg.h
Debug\StdAfx.obj
.....\USBListening.exe
.....\USBListening.ilk
.....\USBListening.obj
.....\USBListening.pch
.....\USBListening.pdb
.....\USBListening.rar
.....\USBListening.res
.....\USBListeningDlg.obj
.....\vc60.idb
.....\vc60.pdb
res
Debug