我正在开发 USB 客户端应用程序,并希望使用 WinUSB 函数来读取和写入 USB 通道。我也想用WinDDK自带的usbsamp驱动和SoftUSBLoopback.dll来实现USB设备的模拟端。我已按照说明(WinUSB (Winusb.sys ) 安装)将 usbsamp“Intel 82930 USB 测试板”驱动程序 (usbsamp.sys) 更新为 WinUSB (winusb.sys) 驱动程序,以便我可以在我的客户端应用程序中使用它。我已经修改了我的 inf 文件(如下所示),并且更新成功完成,但是当我调用 WinUsb_Initialize 时,它总是返回 0。问候,Janusz
;
;
; 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