Link to home
Start Free TrialLog in
Avatar of Tauli
Tauli

asked on

USB Device detection

Hello,

can anybody say me how i detect an usb-device without DBT_DEVICEARRIVAL, because i have no WindowHandle?

I use VS2005 - C++

thx
Avatar of jkr
jkr
Flag of Germany image

If you don't have a window handle, just set up a dummy window to receive the notifications as demonstrated in http://msdn.microsoft.com/en-us/library/aa363432%28VS.85%29.aspx ("Registering for Device Notification"). The only other option is to use a service, sorry.
Avatar of Tauli
Tauli

ASKER

oh i use a service. how i detect it with a service? i can't use windowhandles, because interaction with the desktop is not allowed. it must be work without userlogon...
Avatar of Tauli

ASKER

in addition... it's a raw-communication over USB and the prog interact with mobile-devices. now it must be run as a service. the service exists, the raw-interface exist, both working fine - my last task is combine both parts...
ASKER CERTIFIED SOLUTION
Avatar of jkr
jkr
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Tauli

ASKER

very fine... thx
Avatar of Tauli

ASKER

no comment - all very fine