windows - Detecting USB insertion/Removal in C++ non-GUI application -
i want detect insertion/removal of specific (custom) usb device through c++ application runs in background , has no gui.
i have seen lot of questions , solutions registerdevicenotification
sample code on msdn
but these application has window/form/gui. application doesn't have any. how can use in application?
my last option create invisible window... there other way out??
create message-only window. despite name, it's message queue.