现在想写一个kmdf hid minidriver,找资料返现微软已经提供了相关的例子工程:HIDUSBFX2 sample driver
我在vs2013 wdk 8.1下编译成功,但是在安装该驱动时出现问题,
该驱动无法正常工作,在设备管理器中,该驱动显示黄色感叹号,并提示该驱动无法启动。(代码10)
在c:\windows\inf\setupapi.dev.log中提示如下:
>>> [Device Install (UpdateDriverForPlugAndPlayDevices) - USB\VID_0547&PID_1002]
>>> Section start 2014/03/25 18:02:24.893
cmd: "C:\lx\driver\usb\devcon.exe" -install C:\lx\driver\usb\realUsb\package\hidusbfx2.inf "USB\VID_0547&PID_1002"
dvi: Set selected driver complete.
dvi: {Build Driver List} 18:02:24.925
dvi: Searching for hardware ID(s):
dvi: usb\vid_0547&pid_1002
cpy: Policy is set to make all digital signatures equal.
dvi: Processing a single INF: 'c:\lx\driver\usb\realusb\package\hidusbfx2.inf'
inf: Opened INF: 'c:\lx\driver\usb\realusb\package\hidusbfx2.inf' ([strings])
dvi: Created Driver Node:
dvi: HardwareID - USB\VID_0547&PID_1002
dvi: InfName - c:\lx\driver\usb\realusb\package\hidusbfx2.inf
dvi: DevDesc - KMDF HID Minidriver for OSR USB-FX2 Device
dvi: DrvDesc - KMDF HID Minidriver for OSR USB-FX2 Device
dvi: Provider - Vendor Name
dvi: Mfg - Vendor Name
dvi: ModelsSec - Vendor.NTx86.6.1
dvi: InstallSec - hidusbfx2.Inst.Win7
dvi: Section - hidusbfx2.Inst.Win7.NT
dvi: Rank - 0x80ff0000
dvi: Signer -
dvi: Signer Score - Not digitally signed
dvi: DrvDate - 03/25/2014
dvi: Version - 12.0.57.378
dvi: {Build Driver List - exit(0x00000000)} 18:02:25.003
dvi: {DIF_SELECTBESTCOMPATDRV} 18:02:25.003
dvi: No class installer for 'KMDF HID Minidriver for OSR USB-FX2 Device'
dvi: No CoInstallers found
dvi: Default installer: Enter 18:02:25.018
dvi: {Select Best Driver}
dvi: Selected driver installs from section [hidusbfx2.Inst.Win7] in 'c:\lx\driver\usb\realusb\package\hidusbfx2.inf'.
dvi: Class GUID of device changed to: {745a17a0-74d3-11d0-b6fe-00a0c90f57da}.
dvi: Set selected driver complete.
dvi: Selected:
dvi: Description - [KMDF HID Minidriver for OSR USB-FX2 Device]