I am writing a directory selector control for WPF, and I would like to add/remove a drive from the directory tree when it gets mounted or unmounted or when it becomes ready or not ready (e.g. the user inserts or removes a CD). I am looking for a system event similar to WM_DEVICECHANGE.
konstantin
I used WMI to implement something like this (like Richard stated in his answer)
EDIT: I didn’t invent the code myself, I think I got it from here