Click to See Complete Forum and Search --> : blocking devices


jroemer
February 23rd, 2005, 10:04 AM
Hi,

I've a very special problem:
I have to write a programm that use a positive list of usb or other hot swapable devices. When a user inserts a device, e.g. a usb memory stick, that is not in the positive list, the system should block this device.

i found that there is a api function called RegisterDeviceNotification that inform my windows service when there is a new device, but how to disable it?

i wonder if one could help me

joe

SirNotApearingOnThisForum
February 23rd, 2005, 12:01 PM
You might be able to use one of the messages with DeviceIoControl() (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/devio/base/deviceiocontrol.asp) to do something of the sort.