Hi Everyone,
I'm fairly new to Windows driver writing, but I'm trying to write a UMDF driver for XP. The device I use is an USB Remote (USB receiver CM21E), which sends the signals as USB interrupts. I'm trying to work with the FX2_Driver (Step 1 to 5 and Final) from the umdf examples of the WDK.
I used the .inx file from Peter Wieland's blog (Pointless Blathering | Microsoft Learn).
To make this working for my device I altered the "%OsrUsbDeviceName%" to
[Microsoft.NT$ARCH$]
%OsrUsbDeviceName%=OsrUsb_Install, USB\Vid_0bc7&Pid_0005
The compiling of the drivers goes great (thnx to advice from Peter Wieland and Ilias Tsigkogiannis). The Step 1 to 3 work also great (For what their supposed to do). But when I’m trying to use Step 4 as driver, I get the error:
This Device won't start (Code 10).
What can be the problem?
Some basic explanation to the different steps.
Step1 This is the most basic step. The source file contains absolutely minimal amount of code to get the driver loaded in memory and respond to PNP and Power events. You can install, uninstall, disable, enable, suspend and resume the system and everything will work fine.
Step2 Device registers a Pnp device interface so that application can open an handle to the device.
Device object implements IPnpCallbackHardware interface and initializes USB I/O targets in IPnpCallbackHardware::OnPrepareHardware method.
Step3 Creates a sequential queue for handling IOCTL requests.
Adds code to handle the IOCTL to set bar graph display.
Step4 Creates a parallel queue for handling read and write requests.
Retrieves memory from read and write requests, format the requests and sends it to USB target.
Step5 This step demonstrates eventing by adding support for driver and application to receive switch state change notifications. Driver achieves this by continuously having a pending read to the interrupt pipe.
Final This steps adds the following functionality to complete the driver:
Supports additional IOCTLs to get & set the 7-segment display, get bar graph display and to get config descriptor.
Sets power policy for the device.
Adds code to indicate that the device is ready by lighting up the period on seven- segment display.
"Feel free" - 5 GB Mailbox, 50 FreeSMS/Monat ...
Jetzt GMX ProMail testen: www.gmx.net/de/go/mailfooter/promail-out