Hi. Just for completeness sake, see below for a revised version of the inf file located in the following thread: http://www.osronline.com/showThread.cfm?link=102204
It was pointed out to me by Zhao Yu from Motica that the inf file needed to be revised for copying files correctly in a cross-platform manner (by that I mean 32-bit vs. 64-bit). Zhao quotes from a WDK 6000 document: "The CopyFiles directive does not support decorating a file-list-section name with a system-defined platform extension (.nt, .ntx86, .ntia64, or .ntamd64). ". Thus, the coinstaller in the previous inf file couldn’t copy the two dlls on some platforms. Plus, he requested to have a SourceDiskFiles section put in as well. The inf template below puts in place his changes. So, this should be a better inf file to use to get started…
For those of you who haven’t followed this thread topic, this inf file is a template that can be used to install WinUSB as the primary device driver for a device (just replace the strings, GUIDs, VID and PID). To install, place your tweaked version of this inf file in a directory, then make two subdirectories, “amd64” and “x86”, and place the co-installer dlls (found in the WDK) for those particular platforms in their respective directory and off you go…
Thanks Zhao!
–Brian Hindman
; ================ Version section =================
[Version]
Signature = “$Windows NT$”
Class = MyDeviceClass
ClassGuid = {11111111-2222-3333-4444-555555555555}
Provider = %ProviderName%
DriverVer = 05/22/2007, 6.0.1.0
; ========== Manufacturer/Models sections ===========
[Manufacturer]
%ProviderName% = MyDevice_WinUSB,NTx86,NTia64,NTamd64
[MyDevice_WinUSB.NTx86]
%USB\MyDevice.DeviceDesc% =USB_Install, USB\VID_xxxx&PID_xxxx
[MyDevice_WinUSB.NTamd64]
%USB\MyDevice.DeviceDesc% =USB_Install, USB\VID_xxxx&PID_xxxx
; ================== 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.5
[USB_Install.HW]
AddReg = Dev_AddReg
[Dev_AddReg]
HKR,DeviceInterfaceGUIDs,0x00010000,“{55555555-4444-3333-2222-111111111111}”
[USB_Install.CoInstallers]
AddReg = CoInstallers_AddReg
CopyFiles = CoInstallers_CopyFiles
[CoInstallers_AddReg]
HKR, , CoInstallers32, 0x00010000, “WinUSBCoInstaller.dll”, “WdfCoInstaller01005.dll, WdfCoInstaller”
[CoInstallers_CopyFiles]
WinUSBCoInstaller.dll
WdfCoInstaller01005.dll
[SourceDisksNames]
1 = %MediaDescription%
[SourceDisksFiles]
WinUSBCoInstaller.dll = 1, x86
WdfCoInstaller01005.dll = 1, x86
[SourceDisksFiles.amd64]
WinUSBCoInstaller.dll = 1, amd64
WdfCoInstaller01005.dll = 1, amd64
[DestinationDirs]
CoInstallers_CopyFiles = 11
; ==================== Strings =====================
[Strings]
ProviderName = “My Company”
USB\MyDevice.DeviceDesc=“My Device using WinUSB only”
MediaDescription = “My Installation Media”
WinUSB_SvcDesc = “WinUSB Driver Service”