Asked By Kim Latt
02-Feb-10 02:54 PM

My company and I have developed a usb device, which is suitable for the kind
stuff that can be done using Winusb.sys.
While implementing the code using winusb.sys and installing the drivers on
vista x86 -> Win 7 x64 has been a simple task.
Writing and understanding the requirements to an inf-file suitable for win
xp installs has been pretty complicated, in fact
so complicated, that I am about to give up.
I just followed the numerous examples in win ddk on how the inf file is to
be written.
The first time I realized that something was wrong, was whilst DTM'ing the
driver for whql submission.
My question is: What should be done to the inf-file below, to satisfy xp,
chkinf and WLK?
; ================== Class section ==================
[ClassInstall32]
Addreg=DeviceClassReg
[DeviceClassReg]
HKR,,,0,%ClassName%
HKR,,Icon,,-1
; ========== Manufacturer/Models sections ===========
[Manufacturer]
%ProviderName% = MyDev,NTx86,NTamd64
[MyDev]
%USB\MyDev.DeviceDesc%=USB_Install, USB\VID_xxxx&PID_xxxx ; VID/PID removed
[MyDev.NTx86]
%USB\MyDev.DeviceDesc% =USB_Install, USB\VID_xxxx&PID_xxxx; VID/PID removed
[MyDev.NTamd64]
%USB\MyDev.DeviceDesc% =USB_Install, USB\VID_xxxx&PID_xxxx; VID/PID removed
[USB_Install]
Include=winusb.inf
Needs=WINUSB.NT
[USB_Install.Services]
Include=winusb.inf
AddService=WinUSB,0x00000002,WinUSB_ServiceInstall
[WinUSB_ServiceInstall]
DisplayName = %SvcDesc%
ServiceType = 1
StartType = 3
ErrorControl = 1
ServiceBinary = %12%\WinUSB.sys
[USB_Install.Wdf]
KmdfService=WINUSB, WinUsb_Install
[WinUSB_Install]
KmdfLibraryVersion=1.9
[USB_Install.HW]
AddReg=Dev_AddReg
[Dev_AddReg]
HKR,,DeviceInterfaceGUIDs,0x10000,"{366a8df7-c36a-4cfc-883f-26e291b571ad}"
[USB_Install.CoInstallers]
AddReg=CoInstallers_AddReg
CopyFiles=CoInstallers_CopyFiles
[CoInstallers_AddReg]
HKR,,CoInstallers32,0x00010000,"WdfCoInstaller01009.dll,WdfCoInstaller","WinUSBCoInstaller2.dll"
[CoInstallers_CopyFiles]
WinUSBCoInstaller2.dll
WdfCoInstaller01009.dll
[DestinationDirs]
CoInstallers_CopyFiles=11
[SourceDisksNames]
1 = %DriversDisk%,,,
[SourceDisksFiles.x86]
WinUSBCoInstaller2.dll=1,i386
WdfCoInstaller01009.dll=1,i386
[SourceDisksFiles.amd64]
WinUSBCoInstaller2.dll=1,amd64
WdfCoInstaller01009.dll=1,amd64