I'm calling Windows message WM_DEVICECHANGE using "Windows_Message_Queue.llb". I want to detect if the USB device was pluged or unpluget from PC.
When registering for WM_DEVICECHANGE event (0x0219) I would expect that when device is pluged, I recieved:
wParam = DBT_DEVICEARRIVAL (0x8000) and when device is unpluged i recived: wParam = DBT_DEVICEREMOVECOMPLETE 0x8004
But in any case I recive only message: DBT_DEVNODES_CHANGED (0x0007) so don't know if device was pluged od unpluged.
