Meanwhile I am working on some application with hardware interface connected over USB, so I would like to be notified if USB has been plugged in over some kind of event handler so I can connect to the device automatically.
Microsoft has an posted an Example about (Registering for Device Notification) https://msdn.microsoft.com/en-us/library/windows/desktop/aa363432%28v=vs.85%29.aspx
but according to the documentation. it does not work with Console Application. so which options are left?
Have a look at this thread
Problem is you have a messagequeue but it doesn't operate as within a windows app.