Possible Duplicate:
Looking for C# code for detecting removable drive (usb flash)
I'm woking in C# and WPF. My application has a custom dialog that displays all of the drives that are attached to the computer and allows the user to navigate to a particular folder, where a file will be output by the process in hand. I'm not using the common folder picker dialog because I need functionality not included in that common dialog, as well as a need to keep the dialog's appearance consistent with my application's style.
The purposee of the feature is to allow the user to export data to a thumb drive, so I'd like my appliation to receive notifications when a new drive becomes available. I'm using the string "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}" to represent the MyComputer special folder internally.
I've tried passing this same string to an instance of the FileSystemWatcher
class but this tells me that the string is not a valid path. So it looks like I can't achieve what I want this way.
What is the correct way to receive notification from the OS that a new thumb drive has been added to the computer and add it to my TreeView
control?