Hi Kerem,
Thank you very much. I have solved it. The problem was that, I thought
only one event will be fired when an usb object is inserted but later I
could find for each guid, am getting the event. So after getting the usb
guid, I am getting the correct device class and description.
Also, In XP, the SDRP_LOCATION from SetupDiGetDeviceRegistryProperty (),
returns the device name (for eg, Logitech, Microsoft Live Chat etc ) but in
Vista, the location information is different. What it is the difference?
Thanks again
Ram
"Kerem Gümrükcü" <ka*******@hotmail.comwrote in message
news:%2***************@TK2MSFTNGP06.phx.gbl...
Hi Ram,
i once wrote a application to detect device changes on my system.
The code is written on the fly and is not very "clean" but runs stable.
I only tested it on windows XP systems but it was usefull for my
work. It was a demonstration how to implement a device watcher
in Visual C++ (6.0) for my programming class. You can easily
translate it into C#, it should be no match to do this:
http://entwicklung.junetz.de/project...iceWatcher.zip
Hope this helps,...
Regards
Kerem
--
-----------------------
Beste Grüsse / Best regards / Votre bien devoue
Kerem Gümrükcü
Microsoft Live Space: http://kerem-g.spaces.live.com/
Latest Open-Source Projects: http://entwicklung.junetz.de
-----------------------
"This reply is provided as is, without warranty express or implied."