Class Filter drivers for USB

Hi All,

We have two requirements in our project, it is related to USB devices
in WDM.
We don’t have much idea regarding the USB devices and USB class
drivers.
So I hope I can get some guidance from this group regarding my
problem.

Operating System : Windows XP Embedded.

One requirement is, support only few specific USB devices in the
machine. All other USB devices should be blocked.
The following are the USB device classes to be supported in the
machine.
a. Human Input Devices (HID),
b. Chip/Smart Card Interface Devices (CCID)
c. Various Mass Storage class devices (MSC). E.g… Smart Card
d. Audio and Modem devices

Our Current Idea for implementing this

Remove the class drivers of the classes of devices to be blocked.
Some of the classes we identified to be removed are listed below.

a. Printer Class (usbprint.sys)
b. Communications Device Class (mdismp.sys)
c. Imaging Class (usbscan.sys)
d. Hub Device Class (usbhub.sys )

This can be done while configuring embedded Windows XP.

Will be there any problem if we remove these drivers ?

The second requirement is that the read/write access to the supported
USB devices should be controlled.
i.e… if it the permission set is READ_ONLY, only read access will be
allowed.
Our current Idea for implementing this

  1. Write a USB filter driver ( Say, usbmon.sys)
  2. Install it as a ‘class upper filter driver’ to the required classes
    of devices.
    a. Human Interface Device (HID) Class. (hidclass.sys)
    b. Audio Class (sysaudio.sys)
    c. Mass Storage Class (usbstor.sys)
  3. Export a IOCTL from usbmon.sys so that user mode applications can
    control the read/write operations to .

Is there any better idea for implementing these things. Are we in
right direction?
Please advice.

Thanks in advance,
Binoj.


"This e-mail and any files transmitted with it are for the sole use
of the intended recipient(s) and may contain confidential and privileged
information. If you are not the intended recipient, please contact the
sender by reply e-mail and destroy all copies of the original message.

Any unauthorized review, use, disclosure, dissemination, forwarding,
printing or copying of this email or any action taken upon this e-mail is
strictly prohibited and may be unlawful."