Dear Cedric Moonen, Thanks for your prompt reply!, and of course sorry for my delay! Actually, I am writing a program that need to taking charge of the USB drives being plugged in and authorizing it. When a drive is being plugged in, I could use the wm_devicechange message handler. LRESULT CMyDialog::OnMyDeviceChange(WPARAM wParam, LPARAM lParam) { EnumUSBDevices(); CString strDrive; for(int i=0; i