How to catch an event when a new drive is added to My Computer and preferably and when new mount point for some drive is created on a NTFS drive?
I figued out this
If you have a form, you can override its WndProc method to catch WM_DEVICECHANGE messages as Eugene mentioned:
private const int WM_DEVICECHANGE = 0x219;
protected override void WndProc(ref Message m)
{
base.WndProc(m);
if (m.Msg == WM_DEVICECHANGE)
{
// Check m.wParam to see exactly what happened
}
}