使用WinUSB与USB设备模拟器

时间:2013-04-16 11:29:17

标签: visual-c++ winusb

我正在研究USB客户端应用程序,并希望使用WinUSB函数来读写USB通道。我还想使用提供的WinDDK usbsamp驱动程序和SoftUSBLoopback.dll来实现USB设备的模拟结束。 我已按照说明( WinUSB(Winusb.sys )安装)将usbsamp“Intel 82930 USB Test Board”驱动程序(usbsamp.sys)更新为WinUSB(winusb.sys)驱动程序,以便我可以在我的客户端应用。我修改了我的inf文件(下面提供),并且更新成功完成但是当我调用WinUsb_Initialize时 - 它总是返回0。 问候, 雅努什

;
;
; Installs WinUsb
;

[Version]
Signature = "$Windows NT$"
Class     = USBDevice
ClassGUID = {88BAE032-5A81-49f0-BC3D-A4FF138216D6}
Provider  = %ManufacturerName%
CatalogFile = WinUSBInstallation.cat
DriverVer=04/16/2013,13.54.20.543

; ========== Manufacturer/Models sections ===========

[Manufacturer]
%ManufacturerName% = Microsoft,NTAMD64

[Standard.NTamd64]
%DeviceName% =USB_Install, USB\VID_045E&PID_930A   ; Intel 82930

; For XP and later
[Microsoft.NTAMD64]
%DeviceName%=USB_Install, USB\VID_045E&PID_930A   ; Intel 82930
; ========== Class definition ===========

[ClassInstall32]
AddReg = ClassInstall_AddReg

[ClassInstall_AddReg]
HKR,,,,%ClassName%
HKR,,NoInstallClass,,1
HKR,,IconPath,%REG_MULTI_SZ%,"%systemroot%\system32\setupapi.dll,-20"
HKR,,LowerLogoVersion,,5.2

; =================== Installation ===================

[USB_Install]
Include = winusb.inf
Needs   = WINUSB.NT

[USB_Install.Services]
Include =winusb.inf
Needs   = WINUSB.NT.Services

[USB_Install.HW]
AddReg=Dev_AddReg

[Dev_AddReg]
HKR,,DeviceInterfaceGUIDs,0x10000,"{00873fdf-61a8-11d1-aa5e-00c04fb1728b}"

; [DestinationDirs]
; If your INF needs to copy files, you must not use the DefaultDestDir directive here.  
; You must explicitly reference all file-list-section names in this section.

; =================== Strings ===================

[Strings]
ManufacturerName            = "Microsoft"
ClassName                   = "Sample Device"
DeviceName                  ="Fx2 Learning Kit Device"
REG_MULTI_SZ

            = 0x00010000

0 个答案:

没有答案