Want to control a plugged in USB storage drive
-
I need to create an application that controls a USB storage device just plugged in. When I use WM_DEVICECHANGE notification, I am able to get the details of plugged in device like any other applications registered for a notification. Instead of being one such application that handles notification, I want to take charge of the USB device from the moment it is plugged in. (I guess it need some driver programming) Kindly provide a solution for the same. Biju Raman K
-
I need to create an application that controls a USB storage device just plugged in. When I use WM_DEVICECHANGE notification, I am able to get the details of plugged in device like any other applications registered for a notification. Instead of being one such application that handles notification, I want to take charge of the USB device from the moment it is plugged in. (I guess it need some driver programming) Kindly provide a solution for the same. Biju Raman K
Biju Raman wrote:
Instead of being one such application that handles notification, I want to take charge of the USB device from the moment it is plugged in.
What do you mean by taking charge of it ? It is a storage device so you can access it like a standard 'hard-drive' if you want to read or write files. What's the problem exactly ? What are you trying to do ?
Cédric Moonen Software developer
Charting control [Updated - v1.1] -
Biju Raman wrote:
Instead of being one such application that handles notification, I want to take charge of the USB device from the moment it is plugged in.
What do you mean by taking charge of it ? It is a storage device so you can access it like a standard 'hard-drive' if you want to read or write files. What's the problem exactly ? What are you trying to do ?
Cédric Moonen Software developer
Charting control [Updated - v1.1]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