동일한 MSDN 가이드를 따르려고했지만 몇 가지 문제가있었습니다. 나는 Microchip의 WinUSB 드라이버 템플릿을 사용하여 끝냈다. 이 템플릿은 Microchip Application Libraries에서 찾을 수 있습니다.
MSDN에서 제공 한 예제와 약간 다르지만 시스템에서 작동합니다. 또한 최신 WDK (버전 8.0)와 함께 제공되는 도구 및 dll 파일과도 작동합니다.
이 질문에 대한 답변을 얻지는 못했지만 MSDN에서 제공하는 것과 비교해 볼 때 더 좋은 템플릿이라고 생각합니다. (약간의 수정을)
;This .inf file is a modified version of the example INF provided
;in the Microsoft document:
;"How to Use WinUSB to Communicate with a USB Device"
[Version]
Signature = "$Windows NT$"
Class = CustomUSBDevices
ClassGuid= {a503e2d3-a031-49dc-b684-c99085dbfe92}
Provider = %MFGNAME%
DriverVer=07/20/2012,1.0.0.4
CatalogFile=winusb.cat ;CAT file needed for a signed driver pacakage
;------------------------------------------------------------------------------
; ========== Manufacturer/Models sections ===========
;------------------------------------------------------------------------------
[Manufacturer]
%MFGNAME% = MyDevice_WinUSB,NTx86,NTamd64
;------------------------------------------------------------------------------
; Vendor and Product ID Definitions
;------------------------------------------------------------------------------
; When developing your custom USB device, the VID and PID used in the PC side
; application program and the firmware on the microcontroller must match.
; Modify the below lines to use your VID and PID. Use the format as shown below.
; Note: One INF file can be used for multiple devices with different VID and PIDs.
; For each supported device, append ",USB\VID_xxxx&PID_yyyy" to the end of the line.
; There is a maximum number of devices that can be supported per line however.
; If you append a large number of VID/PIDs to the end of the line, and get a:
; "The data area passed to a system call is too small." error when trying to install
; the INF, try removing some of the VIDs/PIDs.
;------------------------------------------------------------------------------
[MyDevice_WinUSB.NTx86]
%DESCRIPTION% =USB_Install, USB\VID_04d8&PID_0204
[MyDevice_WinUSB.NTamd64]
%DESCRIPTION% =USB_Install, USB\VID_04d8&PID_0204
;=========================================================================================
;ClassInstall32 and ClassInstall_AddReg sections used to make new device manager category.
;=========================================================================================
[ClassInstall32]
AddReg=ClassInstall_AddReg
[ClassInstall_AddReg]
HKR,,,,%DEVICEMANAGERCATEGORY%
HKR,,Icon,,"-20"
; =================== Installation ===================
[USB_Install]
Include=winusb.inf
Needs=WINUSB.NT
[USB_Install.Services]
Include=winusb.inf
AddService=WinUSB,0x00000002,WinUSB_ServiceInstall
[WinUSB_ServiceInstall]
DisplayName = %WinUSB_SvcDesc%
ServiceType = 1
StartType = 3
ErrorControl = 1
ServiceBinary = %12%\WinUSB.sys
[USB_Install.Wdf]
KmdfService=WINUSB, WinUsb_Install
[WinUSB_Install]
KmdfLibraryVersion=1.11
[USB_Install.HW]
AddReg=Dev_AddReg
[Dev_AddReg]
HKR,,DeviceInterfaceGUIDs,0x10000,"{58D07210-27C1-11DD-BD0B-0800200C9a66}"
;When editing the GUID (the big hex number with dashes inside the squiggly
;braces), make sure to write the intended PC application to use the same GUID.
;Otherwise the application won't be able to find the USB device properly.
[USB_Install.CoInstallers]
AddReg=CoInstallers_AddReg
CopyFiles=CoInstallers_CopyFiles
[CoInstallers_AddReg]
HKR,,CoInstallers32,0x00010000,"WdfCoInstaller01011.dll,WdfCoInstaller","WinUSBCoInstaller2.dll"
[CoInstallers_CopyFiles]
WinUSBCoInstaller2.dll
WdfCoInstaller01011.dll
[DestinationDirs]
CoInstallers_CopyFiles=11
; ================= Source Media Section =====================
[SourceDisksNames]
1 = %DISK_NAME%,,,\i386
2 = %DISK_NAME%,,,\amd64
[SourceDisksFiles.x86]
WinUSBCoInstaller2.dll=1
WdfCoInstaller01011.dll=1
[SourceDisksFiles.amd64]
WinUSBCoInstaller2.dll=2
WdfCoInstaller01011.dll=2
; =================== Strings ===================
[Strings]
MFGNAME="Your Manufacturer Name" ; ManufacturerName
DESCRIPTION="Your USB Device Name" ; DeviceName
WinUSB_SvcDesc="WinUSB Device"
DISK_NAME="WinUSB Device Install Disk" ; DiskName
DEVICEMANAGERCATEGORY="Custom USB Devices" ; ClassName
내가 템플릿을 사용하여 시도하고 당신은 내가 가지고 있던 거대한 문제를 해결 :
여기에 INF 파일 마이크로 칩이 제공입니다! http://stackoverflow.com/questions/23127992/usb-driver-installation-issue-for-microcontroller-using-custom-inf 정말 대단합니다. :) – Tagc
잘 했어. 마이크로 소프트가 얼마나 많은 방법으로 빨 수 있는지에 대한 끝이 없습니다. – Shahbaz
클래스가 "UsbDevice"대신 "CustomUSBDevices"인 이유를 설명 할 수 있습니까? 표준 Microsoft 클래스 또는 사용자가 만든 클래스입니까? –