Jack
Jack

Reputation: 21

How to make a usb device load my function driver?

I have written a usb function driver. if I want any usb device that plugged in my computer load this driver rather than its real driver, what should I do? I only know if I change vid/pid when bus driver create pdo, I can make it. But I don't know if there is a easy way to do it. How to change the bus's behaviour? Can a filter driver make it? The platform is Windows.

Upvotes: 2

Views: 900

Answers (1)

Robert Harvey
Robert Harvey

Reputation: 180878

Your best bet is to implement a HID (Human Interface Device) driver. By following the HID guidelines, most functionality you need is already supported, without having to write a custom device driver.

Here are some links to get you started:

Using the HID class eases the job of writing USB device drivers
http://www.edn.com/design/communications-networking/4336292/Using-the-HID-class-eases-the-job-of-writing-USB-device-drivers

Touch, Input, and HID: Architecture and Driver Support
http://msdn.microsoft.com/en-us/library/windows/hardware/gg487435.aspx

For redirection over a network, have a look at the FreeRDP project. It's open-source, under the Apache license, so you can pretty much do whatever you want with the code.

Upvotes: 1

Related Questions