0

Possible Duplicate:
Path of the USB devices which are connected to the machine?

I'm working on a tool which perform different kind of copying - from and to different kind of USB devices, is there any way to know which kind of USB device is connected to my machine through the code? I need it for the copying path

Community
  • 1
  • 1
Shira
  • 765
  • 3
  • 10
  • 14

1 Answers1

1

you need to listen for removable device events and write your code there. i have a post about this here: Listen for removable device events

Ali Tarhini
  • 5,278
  • 6
  • 41
  • 66
  • Do I need different code for each OS? – Shira Dec 14 '10 at 08:50
  • I'll ask it more clear- if I have some USB devices wich connected to my machine- can I know wich path get each one of them? – Shira Dec 14 '10 at 09:03
  • 1
    yes that's easy. first you remember what drives are already existing on your machine(example: c,d) then when a new usb device is plugged, you get enumerate the hdd again, subtract from original list to get the remaining drive – Ali Tarhini Dec 14 '10 at 17:52