I want to detect insertion/removal of a specific (Custom) USB device through a C++ application which runs in background and has no GUI.
I have seen lot of questions
Create a service first and in RegisterDeviceNotification, give the handle of that service instead of a window handle.
RegisterDeviceNotification
Also adjust the third parameter of RegisterDeviceNotification accordingly.