WinUsb mounts but fails to link device

see NTDEV forum thread 103378

Hello,
I am still learning about .inf files & loading drivers.
My current project will probably never see the light of day outside our hallowed halls since it’s a QC device
but we have products in R&D as well they now use drivers from a third party vender we may switch to WinUsb if this works for my project.
My problem is that I have already managed to mount WinUsb on my machine but not the wdf/wudf stuff
from what I can tell that was only needed for HID support which I don’t need anyway or at least the more I see the less it looks like I do.
at this point I do not need a full-blown install I just want to tie my device to WinUsb & setup a testbed to try-out the drivers.

My current problem is that the device loads but for some reason the driver fails to attach!
my latest error message said the .inf was missing an entry [but not a section!], the inf I am using looks something like this:

; Very Experimental copy By Douglas B. Boenke @ Xitron.LLC

;=================== Version section ====================

[Version]
Signature=“$Windows NT$” ; no multi platform stuff yet !
Class=USB ; pre-defined class “USB” & it’s GUID.
ClassGUID={36FC9E60-C465-11CF-8056-444553540000} ;
DriverVer=02/09/2007,1.0.0.0 ; not using this yet added to stop inftest from whining about it.
Provider=ManufacturerName ; your [company] name here ?

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

;---- define company name & create an alias ----
[Manufacturer]
%ManufacturerName%=devicename

;---- models section ( only one for now ) ----
[devicename]
%PrtEmm.DeviceDesc%=MyUsbPrj, USB\VID_xxxx&PID_xxxx

;=================== Install section =======================

[MyUsbPrj]
Include = winusb.inf
Needs = WINUSB.NT
AddReg = MyUsbPrj.AddReg

[MyUsbPrj.Services]
AddService = WinUSB, 0x000001f8, MyUsbPrj.AddService

;---- define the one and only install disk ( ok install folder then ) ----
[SourceDisksNames]
1 = %OurUsbInst%

;---- declare the co-installer .dll files ----
[SourceDisksFiles]
WinUSBCoInstaller.dll = 1

[MyUsbPrj.AddService]
DisplayName = %MyWinUsb.SvcDesc%
ServiceType = 1
StartType = 3
ErrorControl = 1
ServiceBinary = %10%\System32\WinUSB.sys
AddReg = MyUsbPrj.AddReg
LoadOrderGroup = Base

[MyUsbPrj.AddReg]
HKR,DevLoader,*ntkern
HKR,NTMPDriver,WinUSB.sys

; [MyUsbPrj.AddReg.Guid]
HKR,DriverGUID,%MyUsbPrj.GUID%

[MyUsbPrj.CoInstallers]
AddReg=CoInstallers_AddReg
CopyFiles=CoInstallers_CopyFiles,

[CoInstallers_AddReg]
HKR,CoInstallers32,0x00010000,“WinUSBCoInstaller.dll”

[CoInstallers_CopyFiles]
WinUSBCoInstaller.dll

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

[Strings]
ManufacturerName =“Manufacturer”
PrtEmm.DeviceDesc=“device description here”
MyWinUsb.SvcDesc=“WinUSB driver”
OurUsbInst=“Manufacturer USB Install”
MyUsbPrj.GUID=“{YOUR_GUID_HERE}”

I have a few pieces of log file from my last install attempt

THIS SEEMS TO LOOK OK

------------------------------ FROM WINUSB_UPDATE.LOG -------------------------------------------

0.031: ================================================================================
0.031: 2007/02/15 10:03:46.081 (local)
0.031: c:\0cd478645d8313538720fa32a5\update\update.exe (version 6.3.4.0)
0.031: Hotfix started with following command line: /quiet /ER /log:C:\WINDOWS\temp\winusb_update.log
0.031: In Function GetBuildType, line 1170, RegQueryValueEx failed with error 0x2
0.141: In Function TestVolatileFlag, line 12013, RegOpenKeyEx failed with error 0x2
0.141: In Function TestVolatileFlag, line 12045, RegOpenKeyEx failed with error 0x2
0.141: ---- Old Information In The Registry ------
0.141: Source:c:\007f23e7a3b1212705\update\update.exe (6.3.4.0)
0.141: Destination:
0.141: Source:c:\007f23e7a3b1212705\update
0.141: Destination:
0.141: Source:c:\007f23e7a3b1212705
0.141: Destination:
0.141: Source:c:\e6728d72a6fe1c48f93b4ba61ed5c4\update\update.exe (6.3.4.0)
0.141: Destination:
0.141: Source:c:\e6728d72a6fe1c48f93b4ba61ed5c4\update\updspapi.dll (6.3.4.0)
0.141: Destination:
0.141: Source:c:\e6728d72a6fe1c48f93b4ba61ed5c4\update
0.141: Destination:
0.141: Source:c:\e6728d72a6fe1c48f93b4ba61ed5c4
0.141: Destination:
0.141: Source:c:\69852a20cb48805dbdd7\update\update.exe (6.3.4.0)
0.141: Destination:
0.141: Source:c:\69852a20cb48805dbdd7\update
0.141: Destination:
0.141: Source:c:\69852a20cb48805dbdd7
0.141: Destination:
0.141: ---- New Information In The Registry ------
0.141: Source:c:\007f23e7a3b1212705\update\update.exe (6.3.4.0)
0.141: Destination:
0.141: Source:c:\007f23e7a3b1212705\update
0.141: Destination:
0.141: Source:c:\007f23e7a3b1212705
0.141: Destination:
0.141: Source:c:\e6728d72a6fe1c48f93b4ba61ed5c4\update\update.exe (6.3.4.0)
0.141: Destination:
0.141: Source:c:\e6728d72a6fe1c48f93b4ba61ed5c4\update\updspapi.dll (6.3.4.0)
0.141: Destination:
0.141: Source:c:\e6728d72a6fe1c48f93b4ba61ed5c4\update
0.141: Destination:
0.141: Source:c:\e6728d72a6fe1c48f93b4ba61ed5c4
0.141: Destination:
0.141: Source:c:\69852a20cb48805dbdd7\update\update.exe (6.3.4.0)
0.141: Destination:
0.141: Source:c:\69852a20cb48805dbdd7\update
0.141: Destination:
0.141: Source:c:\69852a20cb48805dbdd7
0.141: Destination:
0.156: In Function GetBuildType, line 1170, RegQueryValueEx failed with error 0x2
0.156: SetProductTypes: InfProductBuildType=BuildType.IP
0.156: SetAltOsLoaderPath: No section uses DirId 65701; done.
0.156: DoInstallation: FetchSourceURL for c:\0cd478645d8313538720fa32a5\update\update_XP.inf failed
0.156: CreateUninstall = 0,Directory = C:\WINDOWS$NtUninstallwinusb0100$
0.156: LoadFileQueues: UpdSpGetSourceFileLocation for halmacpi.dll failed: 0xe0000102
0.156: BuildCabinetManifest: update.url absent
0.156: Starting AnalyzeComponents
0.156: AnalyzePhaseZero used 0 ticks
0.156: No c:\windows\INF\updtblk.inf file.
0.156: SetupFindFirstLine in LoadExclusionList Failed with error: 0xe0000102
0.156: SetupFindFirstLine in LoadExclusionList Failed with error: 0xe0000102
3.266: C:\WINDOWS\system32\CatRoot{F750E6C3-38EE-11D1-85E5-00C04FC295EE}\oem7.CAT trusts inf c:\windows\inf\oem7.inf of device NVAX\NFORCE_VAD\4&212292CD&0&0000
3.766: C:\WINDOWS\system32\CatRoot{F750E6C3-38EE-11D1-85E5-00C04FC295EE}\oem2.CAT trusts inf c:\windows\inf\oem2.inf of device PCI\VEN_10DE&DEV_0052&SUBSYS_815A1043&REV_A2\3&2411E6FE&0&09
5.250: C:\WINDOWS\system32\CatRoot{F750E6C3-38EE-11D1-85E5-00C04FC295EE}\oem1.CAT trusts inf c:\windows\inf\oem1.inf of device PCI\VEN_10DE&DEV_005E&SUBSYS_815A1043&REV_A3\3&2411E6FE&0&00
6.062: Failed to query DriverPath of ROOT\LEGACY_AFD\0000 0x2
6.062: Failed to query DriverPath of ROOT\LEGACY_BEEP\0000 0x2
6.062: Failed to query DriverPath of ROOT\LEGACY_DMBOOT\0000 0x2
6.062: Failed to query DriverPath of ROOT\LEGACY_DMLOAD\0000 0x2
6.078: Failed to query DriverPath of ROOT\LEGACY_EECTRL\0000 0x2
6.078: Failed to query DriverPath of ROOT\LEGACY_ERASERUTILREBOOTDRV\0000 0x2
6.078: Failed to query DriverPath of ROOT\LEGACY_FIPS\0000 0x2
6.078: Failed to query DriverPath of ROOT\LEGACY_GPC\0000 0x2
6.078: Failed to query DriverPath of ROOT\LEGACY_HARDLOCK\0000 0x2
6.078: Failed to query DriverPath of ROOT\LEGACY_HASPNT\0000 0x2
6.078: Failed to query DriverPath of ROOT\LEGACY_HTTP\0000 0x2
6.078: Failed to query DriverPath of ROOT\LEGACY_IPNAT\0000 0x2
6.078: Failed to query DriverPath of ROOT\LEGACY_IPSEC\0000 0x2
6.078: Failed to query DriverPath of ROOT\LEGACY_ISPDEV\0000 0x2
6.078: Failed to query DriverPath of ROOT\LEGACY_KSECDD\0000 0x2
6.078: Failed to query DriverPath of ROOT\LEGACY_MNMDD\0000 0x2
6.078: Failed to query DriverPath of ROOT\LEGACY_MODEM\0000 0x2
6.078: Failed to query DriverPath of ROOT\LEGACY_MOUNTMGR\0000 0x2
6.078: Failed to query DriverPath of ROOT\LEGACY_NAVENG\0000 0x2
6.078: Failed to query DriverPath of ROOT\LEGACY_NAVEX15\0000 0x2
6.078: Failed to query DriverPath of ROOT\LEGACY_NDIS\0000 0x2
6.078: Failed to query DriverPath of ROOT\LEGACY_NDISTAPI\0000 0x2
6.078: Failed to query DriverPath of ROOT\LEGACY_NDISUIO\0000 0x2
6.078: Failed to query DriverPath of ROOT\LEGACY_NDPROXY\0000 0x2
6.078: Failed to query DriverPath of ROOT\LEGACY_NETBT\0000 0x2
6.078: Failed to query DriverPath of ROOT\LEGACY_NM\0000 0x2
6.078: Failed to query DriverPath of ROOT\LEGACY_NPF\0000 0x2
6.078: Failed to query DriverPath of ROOT\LEGACY_NULL\0000 0x2
6.078: Failed to query DriverPath of ROOT\LEGACY_PACJTAG\0000 0x2
6.078: Failed to query DriverPath of ROOT\LEGACY_PARTMGR\0000 0x2
6.078: Failed to query DriverPath of ROOT\LEGACY_PARVDM\0000 0x2
6.078: Failed to query DriverPath of ROOT\LEGACY_RASACD\0000 0x2
6.078: Failed to query DriverPath of ROOT\LEGACY_RDPCDD\0000 0x2
6.078: Failed to query DriverPath of ROOT\LEGACY_SAVRT\0000 0x2
6.078: Failed to query DriverPath of ROOT\LEGACY_SAVRTPEL\0000 0x2
6.078: Failed to query DriverPath of ROOT\LEGACY_SENTINEL\0000 0x2
6.078: Failed to query DriverPath of ROOT\LEGACY_SPBBCDRV\0000 0x2
6.078: Failed to query DriverPath of ROOT\LEGACY_SYMEVENT\0000 0x2
6.078: Failed to query DriverPath of ROOT\LEGACY_SYMREDRV\0000 0x2
6.078: Failed to query DriverPath of ROOT\LEGACY_SYMTDI\0000 0x2
6.078: Failed to query DriverPath of ROOT\LEGACY_TCPIP\0000 0x2
6.078: Failed to query DriverPath of ROOT\LEGACY_VGASAVE\0000 0x2
6.078: Failed to query DriverPath of ROOT\LEGACY_VOLSNAP\0000 0x2
6.078: Failed to query DriverPath of ROOT\LEGACY_WANARP\0000 0x2
8.031: SetupVerifyInfFile failed with error 0x490 for oem13.inf of device USB\VID_04B4&PID_0082\5&3A8FFAE1&0&2
8.062: SetupVerifyInfFile failed with error 0x490 for c:\windows\inf\oem13.inf of device USB\VID_04B4&PID_0082\5&3A8FFAE1&0&2
8.078: SetupVerifyInfFile failed with error 0x490 for cymonpre.inf of device USB\VID_04B4&PID_0082\5&3A8FFAE1&0&9
8.094: SetupVerifyInfFile failed with error 0x490 for c:\windows\inf\cymonpre.inf of device USB\VID_04B4&PID_0082\5&3A8FFAE1&0&9
8.094: SetupVerifyInfFile failed with error 0x490 for oem17.inf of device USB\VID_04B4&PID_1004\5&3A8FFAE1&0&10
8.109: SetupVerifyInfFile failed with error 0x490 for c:\windows\inf\oem17.inf of device USB\VID_04B4&PID_1004\5&3A8FFAE1&0&10
8.109: SetupVerifyInfFile failed with error 0x490 for cyusbpre.inf of device USB\VID_04B4&PID_1004\5&3A8FFAE1&0&9
8.141: SetupVerifyInfFile failed with error 0x490 for c:\windows\inf\cyusbpre.inf of device USB\VID_04B4&PID_1004\5&3A8FFAE1&0&9
8.141: SetupVerifyInfFile failed with error 0x490 for oem17.inf of device USB\VID_04B4&PID_8613\5&3A8FFAE1&0&10
8.156: SetupVerifyInfFile failed with error 0x490 for c:\windows\inf\oem17.inf of device USB\VID_04B4&PID_8613\5&3A8FFAE1&0&10
8.156: Failed to query DriverPath of USB\VID_04B4&PID_8613\5&3A8FFAE1&0&2 0x2
8.156: SetupVerifyInfFile failed with error 0x490 for oem15.inf of device USB\VID_04B4&PID_8613\5&3A8FFAE1&0&9
8.281: SetupVerifyInfFile failed with error 0x490 for aksusb.inf of device USB\VID_0529&PID_0001\5&36C701F9&0&1
8.391: SetupVerifyInfFile failed with error 0x490 for c:\windows\inf\aksusb.inf of device USB\VID_0529&PID_0001\5&36C701F9&0&1
8.391: SetupVerifyInfFile failed with error 0x490 for aksusb.inf of device USB\VID_0529&PID_0001\5&36C701F9&0&10
8.500: SetupVerifyInfFile failed with error 0x490 for c:\windows\inf\aksusb.inf of device USB\VID_0529&PID_0001\5&36C701F9&0&10
8.500: SetupVerifyInfFile failed with error 0x490 for aksusb.inf of device USB\VID_0529&PID_0001\5&36C701F9&0&2
8.594: SetupVerifyInfFile failed with error 0x490 for c:\windows\inf\aksusb.inf of device USB\VID_0529&PID_0001\5&36C701F9&0&2
8.609: SetupVerifyInfFile failed with error 0x490 for ezusbw2k.inf of device USB\VID_0547&PID_1002\5&3A8FFAE1&0&2
8.703: SetupVerifyInfFile failed with error 0x490 for c:\windows\inf\ezusbw2k.inf of device USB\VID_0547&PID_1002\5&3A8FFAE1&0&2
8.719: SetupVerifyInfFile failed with error 0x490 for ezusbw2k.inf of device USB\VID_0547&PID_1002\5&3A8FFAE1&0&9
8.812: SetupVerifyInfFile failed with error 0x490 for c:\windows\inf\ezusbw2k.inf of device USB\VID_0547&PID_1002\5&3A8FFAE1&0&9
8.984: SetupVerifyInfFile failed with error 0x490 for oem23.inf of device USB\MyVid&PID_0108\5&3A8FFAE1&0&10
9.000: SetupVerifyInfFile failed with error 0x490 for oem15.inf of device USB\MyVid&PID_A6FA\5&36C701F9&0&9
9.031: SetupVerifyInfFile failed with error 0x490 for oem15.inf of device USB\MyVid&PID_A6FA\5&3A8FFAE1&0&10
9.047: SetupVerifyInfFile failed with error 0x490 for oem15.inf of device USB\MyVid&PID_A6FA\5&3A8FFAE1&0&9
9.078: Failed to query DriverPath of USB\MyVid&MyPid\5&3A8FFAE1&0&9 0x2
9.781: OEM file scan used 9625 ticks
9.797: AnalyzePhaseOne: used 9641 ticks
9.797: AnalyzeComponents: Hotpatch analysis disabled; skipping.
9.797: AnalyzeComponents: Hotpatching is disabled.
9.797: AnalyzePhaseTwo used 0 ticks
9.797: AnalyzePhaseThree used 0 ticks
9.797: AnalyzePhaseFive used 0 ticks
9.797: AnalyzePhaseSix used 0 ticks
9.797: AnalyzeComponents used 9641 ticks
9.797: Downloading 0 files
9.797: bPatchMode = FALSE
9.797: Inventory complete: ReturnStatus=0, 9641 ticks
9.797: Num Ticks for invent : 9641
9.797: Allocation size of drive C: is 4096 bytes, free space = 289126113280 bytes
9.797: Drive C: free 275732MB req: 5MB w/uninstall 0MB
9.797: CabinetBuild complete
9.797: Num Ticks for Cabinet build : 0
9.797: DynamicStrings section not defined or empty.
9.797: FileInUse:: Added to Filelist: c:\windows\winusb0100.cat
9.844: FileInUse:: PrintTasksUsingModule: No tasks found using c:\windows\winusb0100.cat
10.844: LoadFileQueues: UpdSpGetSourceFileLocation for halmacpi.dll failed: 0xe0000102
10.875: System Restore Point set.
10.875: Copied file: C:\WINDOWS\system32\spmsg2.dll
10.875: PFE2: Not avoiding Per File Exceptions.
10.906: GetCatVersion: Failed to retrieve version information from C:\WINDOWS\system32\CatRoot{F750E6C3-38EE-11D1-85E5-00C04FC295EE}\winusb0100.cat with error 0x80092004
10.906: GetCatVersion: Failed to retrieve version information from C:\WINDOWS\winusb0100.cat with error 0x80092004
11.047: DoInstallation: Installing assemblies with source root path: c:\0cd478645d8313538720fa32a5\
11.047: Num Ticks for Copying files : 1250
11.047: Num Ticks for Reg update and deleting 0 size files : 0
11.047: ---- Old Information In The Registry ------
11.047: Source:c:\007f23e7a3b1212705\update\update.exe (6.3.4.0)
11.047: Destination:
11.047: Source:c:\007f23e7a3b1212705\update
11.047: Destination:
11.047: Source:c:\007f23e7a3b1212705
11.047: Destination:
11.047: Source:c:\e6728d72a6fe1c48f93b4ba61ed5c4\update\update.exe (6.3.4.0)
11.047: Destination:
11.047: Source:c:\e6728d72a6fe1c48f93b4ba61ed5c4\update\updspapi.dll (6.3.4.0)
11.047: Destination:
11.047: Source:c:\e6728d72a6fe1c48f93b4ba61ed5c4\update
11.047: Destination:
11.047: Source:c:\e6728d72a6fe1c48f93b4ba61ed5c4
11.047: Destination:
11.047: Source:c:\69852a20cb48805dbdd7\update\update.exe (6.3.4.0)
11.047: Destination:
11.047: Source:c:\69852a20cb48805dbdd7\update
11.047: Destination:
11.047: Source:c:\69852a20cb48805dbdd7
11.047: Destination:
11.047: ---- New Information In The Registry ------
11.047: Source:c:\007f23e7a3b1212705\update\update.exe (6.3.4.0)
11.047: Destination:
11.047: Source:c:\007f23e7a3b1212705\update
11.047: Destination:
11.047: Source:c:\007f23e7a3b1212705
11.047: Destination:
11.062: Source:c:\e6728d72a6fe1c48f93b4ba61ed5c4\update\update.exe (6.3.4.0)
11.062: Destination:
11.062: Source:c:\e6728d72a6fe1c48f93b4ba61ed5c4\update\updspapi.dll (6.3.4.0)
11.062: Destination:
11.062: Source:c:\e6728d72a6fe1c48f93b4ba61ed5c4\update
11.062: Destination:
11.062: Source:c:\e6728d72a6fe1c48f93b4ba61ed5c4
11.062: Destination:
11.062: Source:c:\69852a20cb48805dbdd7\update\update.exe (6.3.4.0)
11.062: Destination:
11.062: Source:c:\69852a20cb48805dbdd7\update
11.062: Destination:
11.062: Source:c:\69852a20cb48805dbdd7
11.062: Destination:
11.062: UpdateSpUpdSvcInf: Source [ProcessesToRunAfterReboot] section is empty; nothing to do.
11.062: RebootNecessary = 0,WizardInput = 1 , DontReboot = 1, ForceRestart = 0

-------------------------------------- FROM SETUPACT.LOG ----------------------------------------

[02/15/2007 10:03.44.831] WinusbUpdate: Looking for resource WINUSB_INSTALLER_RESOURCE

[02/15/2007 10:03.44.831] WinusbUpdate: Locating resource stream WINUSB_INSTALLER_RESOURCE.

[02/15/2007 10:03.44.846] WinusbUpdate: unpacking update from resource to Microsoft WinUsb Install-v1.0.exe.

[02/15/2007 10:03.44.846] WinusbUpdate: Temporary path is C:\WINDOWS\Temp\Win129E.tmp.

[02/15/2007 10:03.44.862] WinusbUpdate: Invoking update with command line “/quiet /ER /log:”%WINDIR%\temp\winusb_update.log"".

[02/15/2007 10:03.44.878] WinusbUpdate: Invoking ““C:\WINDOWS\Temp\Win129E.tmp\Microsoft WinUsb Install-v1.0.exe” /quiet /ER /log:“C:\WINDOWS\temp\winusb_update.log””.

[02/15/2007 10:03.44.878] WinusbUpdate: Waiting for update to terminate.

[02/15/2007 10:03.57.331] WinusbUpdate: Update process returned 0.

[02/15/2007 10:03.57.362] WinusbUpdate: Cleaning up update.

-------------------------------------- FROM SETUPACT.LOG ----------------------------------------

#I123 Doing full install of “USB\MyVid&MyPid\5&3A8FFAE1&0&9”.
#E362 An unsigned or incorrectly signed file “c:\temp\myusbinst\device.inf” for driver “PrtEmm.DeviceDesc” will be installed (Policy=Warn). Error 0xe000022f: The third-party INF does not contain digital signature information.
#-035 Processing service Add/Delete section [MyUsbPrj.Services].
#E275 Error while installing services. Error 0xe0000219: The installation failed because a function driver was not specified for this device instance.
#E122 Device install failed. Error 0xe0000219: The installation failed because a function driver was not specified for this device instance.
#E157 Default installer failed. Error 0xe0000219: The installation failed because a function driver was not specified for this device instance.
#I060 Set selected driver.
#I125 Installing NULL driver for “USB\MyVid&MyPid\5&3A8FFAE1&0&9”.
#I121 Device install of “USB\MyVid&MyPid\5&3A8FFAE1&0&9” finished successfully.
[2007/02/15 10:04:09 3536.284]
#-198 Command line processed: “C:\WINDOWS\system32\mmc.exe” /s C:\WINDOWS\system32\compmgmt.msc
#-166 Device install function: DIF_REMOVE.
#I289 Removing device “USB\MyVid&MyPid\5&3A8FFAE1&0&9”.
#I048 Device removed.

I’m stumped do I need to write responce code on the host side or something to get WinUsb to link to my gizmo ?
I’ve recently seen error # 1 device was not configured properly from device manager’s install wizard so I must be close
since winusb does install that and when I started it wae @ error twenty-something forgot the message about a week ago…
any help I can get at this point would be a god-send. DBB

xxxxx@xitron.com wrote:

Hello,
I am still learning about .inf files & loading drivers.
My current project will probably never see the light of day outside our hallowed halls since it’s a QC device but we have products in R&D as well they now use drivers from a third party vender we may switch to WinUsb if this works for my project.
My problem is that I have already managed to mount WinUsb on my machine but not the wdf/wudf stuff
from what I can tell that was only needed for HID support which I don’t need anyway or at least the more I see the less it looks like I do.
at this point I do not need a full-blown install I just want to tie my device to WinUsb & setup a testbed to try-out the drivers.

My current problem is that the device loads but for some reason the driver fails to attach!
my latest error message said the .inf was missing an entry [but not a section!], the inf I am using looks something like this:


[MyUsbPrj.AddService]
DisplayName = %MyWinUsb.SvcDesc%
ServiceType = 1
StartType = 3
ErrorControl = 1
ServiceBinary = %10%\System32\WinUSB.sys
AddReg = MyUsbPrj.AddReg
LoadOrderGroup = Base

“AddReg” is not recognized in an AddService section.

You do not want to use “LoadOrderGroup” in a P&P driver.

The co-installer is going to install WinUSB.sys in system32\drivers, not
system32. You can use %12% for that:
ServiceBinary = %12%\WinUSB.sys
I’m guessing that’s the root of the problem: ServiceBinary points to
empty space.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Tim,
thanks for the help I am close[r] but still no cigar, I made the changes you suggested & still no joy ! it gets to “[MyUsbPrj.Services]” then goes to hell.
I went digging thru the log files the only complaning was in setupapi.log as follows :

###################################################################################################
#-166 Device install function: DIF_INSTALLDEVICE.
#I123 Doing full install of “USB\VID_xxxx&PID_xxxx\5&3A8FFAE1&0&9”.
#E362 An unsigned or incorrectly signed file “c:\temp\OurInstall\gizmo.inf” for driver “OurDevice” will be installed (Policy=Warn). Error 0xe000022f: The third-party INF does not contain digital signature information.
#-035 Processing service Add/Delete section [MyUsbPrj.Services].
#E275 Error while installing services. Error 0xe0000219: The installation failed because a function driver was not specified for this device instance.
#E122 Device install failed. Error 0xe0000219: The installation failed because a function driver was not specified for this device instance.
#E157 Default installer failed. Error 0xe0000219: The installation failed because a function driver was not specified for this device instance.
#I060 Set selected driver.
#I125 Installing NULL driver for “USB\VID_xxxx&PID_xxxx\5&3A8FFAE1&0&9”.
#I121 Device install of “USB\VID_xxxx&PID_xxxx\5&3A8FFAE1&0&9” finished successfully.
###################################################################################################

I thought winusb was the function driver ? but it should find that just fine.
Device manager still thinks I am missing something & it’s probably right but what ?
the problem in the service install section that much I’ve been able to determine on my own, should I move the GUID line somewhere else ?
the .inf file now looks like this :

;=================== Version section ====================

[Version]
Signature=“$Windows NT$” ; no multi platform stuff yet !
Class=USB ; pre-defined class “USB” & it’s GUID.
ClassGUID={36FC9E60-C465-11CF-8056-444553540000} ;
DriverVer=02/09/2007,1.0.0.0 ; not using this yet added to stop inftest from whining about it.
Provider=ManufacturerName ; your [company] name here ?

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

;---- define company name & create an alias ----
[Manufacturer]
%ManufacturerName%=devicename

;---- models section ( only one for now ) ----
[devicename]
%PrtEmm.DeviceDesc%=MyUsbPrj, USB\VID_xxxx&PID_xxxx

;=================== Install section =======================

[MyUsbPrj]
Include = winusb.inf
Needs = WINUSB.NT
AddReg = MyUsbPrj.AddReg

[MyUsbPrj.Services]
AddService = WinUSB, 0x000001f8, MyUsbPrj.AddService

;---- define the one and only install disk ( ok install folder then ) ----
[SourceDisksNames]
1 = %OurUsbInst%

;---- declare the co-installer .dll files ----
[SourceDisksFiles]
WinUSBCoInstaller.dll = 1

[MyUsbPrj.AddService]
DisplayName = %MyWinUsb.SvcDesc%
ServiceType = 1
StartType = 3
ErrorControl = 1
ServiceBinary = %12%\WinUSB.sys

[MyUsbPrj.AddReg]
HKR,DevLoader,*ntkern
HKR,NTMPDriver,WinUSB.sys
HKR,DriverGUID,%MyUsbPrj.GUID%

[MyUsbPrj.CoInstallers]
AddReg=CoInstallers_AddReg
CopyFiles=CoInstallers_CopyFiles,

[CoInstallers_AddReg]
HKR,CoInstallers32,0x00010000,“WinUSBCoInstaller.dll”

[CoInstallers_CopyFiles]
WinUSBCoInstaller.dll

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

[Strings]
ManufacturerName =“Manufacturer”
PrtEmm.DeviceDesc=“device description here”
MyWinUsb.SvcDesc=“WinUSB driver”
OurUsbInst=“Manufacturer USB Install”
MyUsbPrj.GUID=“{YOUR_GUID_HERE}”

###################################################################################################

still flying blind here it would be nice if manager could say what was missing just knowing that
something was omitted is not enough.
DBB

WinUsb is a KMDF driver, so you also need to include the KMDF
coinstaller and the WDF sections in the inf.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@xitron.com
Sent: Thursday, February 15, 2007 12:29 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] WinUsb mounts but fails to link device

Tim,
thanks for the help I am close[r] but still no cigar, I made the changes
you suggested & still no joy ! it gets to “[MyUsbPrj.Services]” then
goes to hell.
I went digging thru the log files the only complaning was in
setupapi.log as follows :

########################################################################
###########################
#-166 Device install function: DIF_INSTALLDEVICE.
#I123 Doing full install of “USB\VID_xxxx&PID_xxxx\5&3A8FFAE1&0&9”.
#E362 An unsigned or incorrectly signed file
“c:\temp\OurInstall\gizmo.inf” for driver “OurDevice” will be installed
(Policy=Warn). Error 0xe000022f: The third-party INF does not contain
digital signature information.
#-035 Processing service Add/Delete section [MyUsbPrj.Services].
#E275 Error while installing services. Error 0xe0000219: The
installation failed because a function driver was not specified for this
device instance.
#E122 Device install failed. Error 0xe0000219: The installation failed
because a function driver was not specified for this device instance.
#E157 Default installer failed. Error 0xe0000219: The installation
failed because a function driver was not specified for this device
instance.
#I060 Set selected driver.
#I125 Installing NULL driver for “USB\VID_xxxx&PID_xxxx\5&3A8FFAE1&0&9”.
#I121 Device install of “USB\VID_xxxx&PID_xxxx\5&3A8FFAE1&0&9” finished
successfully.
########################################################################
###########################

I thought winusb was the function driver ? but it should find that just
fine.
Device manager still thinks I am missing something & it’s probably right
but what ?
the problem in the service install section that much I’ve been able to
determine on my own, should I move the GUID line somewhere else ?
the .inf file now looks like this :

;=================== Version section ====================

[Version]
Signature=“$Windows NT$” ; no multi
platform stuff yet !
Class=USB ; pre-defined
class “USB” & it’s GUID.
ClassGUID={36FC9E60-C465-11CF-8056-444553540000} ;
DriverVer=02/09/2007,1.0.0.0 ; not using this
yet added to stop inftest from whining about it.
Provider=ManufacturerName ; your [company]
name here ?

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

;---- define company name & create an alias ----
[Manufacturer]
%ManufacturerName%=devicename

;---- models section ( only one for now ) ----
[devicename]
%PrtEmm.DeviceDesc%=MyUsbPrj, USB\VID_xxxx&PID_xxxx

;=================== Install section =======================

[MyUsbPrj]
Include = winusb.inf
Needs = WINUSB.NT
AddReg = MyUsbPrj.AddReg

[MyUsbPrj.Services]
AddService = WinUSB, 0x000001f8, MyUsbPrj.AddService

;---- define the one and only install disk ( ok install folder then )

[SourceDisksNames]
1 = %OurUsbInst%

;---- declare the co-installer .dll files ----
[SourceDisksFiles]
WinUSBCoInstaller.dll = 1

[MyUsbPrj.AddService]
DisplayName = %MyWinUsb.SvcDesc%
ServiceType = 1
StartType = 3
ErrorControl = 1
ServiceBinary = %12%\WinUSB.sys

[MyUsbPrj.AddReg]
HKR,DevLoader,*ntkern
HKR,NTMPDriver,WinUSB.sys
HKR,DriverGUID,%MyUsbPrj.GUID%

[MyUsbPrj.CoInstallers]
AddReg=CoInstallers_AddReg
CopyFiles=CoInstallers_CopyFiles,

[CoInstallers_AddReg]
HKR,CoInstallers32,0x00010000,“WinUSBCoInstaller.dll”

[CoInstallers_CopyFiles]
WinUSBCoInstaller.dll

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

[Strings]
ManufacturerName =“Manufacturer”
PrtEmm.DeviceDesc=“device description here”
MyWinUsb.SvcDesc=“WinUSB driver”
OurUsbInst=“Manufacturer USB Install”
MyUsbPrj.GUID=“{YOUR_GUID_HERE}”

########################################################################
###########################

still flying blind here it would be nice if manager could say what was
missing just knowing that
something was omitted is not enough.
DBB


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

xxxxx@xitron.com wrote:

I thought winusb was the function driver ? but it should find that just fine.
Device manager still thinks I am missing something & it’s probably right but what ?
the problem in the service install section that much I’ve been able to determine on my own, should I move the GUID line somewhere else ?
the .inf file now looks like this :

;=================== Version section ====================

[Version]
Signature=“$Windows NT$” ; no multi platform stuff yet !
Class=USB ; pre-defined class “USB” & it’s GUID.
ClassGUID={36FC9E60-C465-11CF-8056-444553540000} ;
DriverVer=02/09/2007,1.0.0.0 ; not using this yet added to stop inftest from whining about it.
Provider=ManufacturerName ; your [company] name here ?

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

;---- define company name & create an alias ----
[Manufacturer]
%ManufacturerName%=devicename

Ah, I think I see it. In the [Version] sections, you need % signs
around ManufacturerName. The Provider string is matched literally,
character for character, against the list of lines in the [Manufacturer]
section. In your case, it’s going to look for the literal
“ManufacturerName”, but in your [Manufacturer] section, it will get the
substituted value from your [Strings] section, which is “Manufacturer”

The rest of this looks pretty much OK.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Been busy elsewhere, but I’m sorta surprised nobody noticed this earlier…

You want to have a service recognized as the function driver for a device instance, y’all had better turn on bit 1 in the second entry in the AddService keyword’s value- the one so many sample INFs use %SPSVCINST_ASSOCSERVICE% for…

You’re using 0x000001f8, so myself, I think I’d try 0x000001fa. Of course, I’d also turn to my WDK first and make sure the other bits that are on in that entry are also what I want.

But a hot meal (whenever I get around to cooking it) and an Xbox 360 (which will turn on sooner than the range, no doubt:-) are beckoning, and you can read the WDK as well as I can, so I’ll post half an answer and go, in my usual wont…

Thanks Tim, Bob for flags problem & typo in “version” extra big thanks to Randy for the all importent ‘A’ to my burning ‘Q’ NO !! WinUsb will not work w/o WDF & KMDF seems I do need them after all since WinUsb is a KMDF driver it can’t operate w/o that support [grumble] that re-complicates this I had them in my inf before guess they go back.
Also I should point out this device of mine is Cypress based it numerates one it numerates twice it goes down in flames like a hot rock from space no suprise it fails to boot without a driver it never did run that way - interesting it needs the cpu to numerate then gets stuck somewhere just after 2nd numeration this was as far as the “generic parent” Usb driver would take it.
Oh well looks like I have a whole day’s battle ahead so my next post will likely be monday enjoy your weekends.

And then again maybe it will just start working on it’s own…
ok it wasn’t quite that easy I was looking thru the WinDDK docs & found I need cryptographic services to load KMDF so I went to control panel->admin->services lo&behold it was not running so I fixed that then went down the list to see if anything else I needed was disabled as well sure enough it showed “user mode driver framework” was installed by a prior attempt but was also not running [TADA] so I clicked “start” & plugged my board in guess what? WinUsb connected my device with no trouble at all!.
NOTE to the nice folks at 'soft add this glitch to the .html in WinDDK\6000 so other may dodge this annoying little problem since WinUsb will not run without the MDF !
thanks for all the help now I can FINALY start working on code [something I actualy know] & stop messing with .inf files where I am a fish out of water.

Crumbs!,
ok I know better it’s never THAT easy! - seems WinUsb will attach my device just fine but somwhere I forgot to stroke a ‘t’ or dot an ‘i’ the board stills ‘hangs’ after 2nd numeration my power-up tests never run. Anyone know why WinUsb would connect a Cypress chip w/o completing the handshake ?. Any info would help guess it’s time to hit the books again at least it looks like I only have one last hurdle to clear before working on host-side code for now I will re-read my firmware to see if it holds any clues since I know the cpu WAS running durring the dual numeration! oh well.

My bad,
RS232 connections weren’t in the right order!, fixed that & yes my debug channel does respond when I plug the monster in - cool! off drivers & firmware on to desktop APP [safe bet that’s where my weekend goes] thanks for all the help may still post here w/ advice or problems involving host side code re:WinUsb - DBB

xxxxx@xitron.com wrote:

Crumbs!,
ok I know better it’s never THAT easy! - seems WinUsb will attach my device just fine but somwhere I forgot to stroke a ‘t’ or dot an ‘i’ the board stills ‘hangs’ after 2nd numeration my power-up tests never run. Anyone know why WinUsb would connect a Cypress chip w/o completing the handshake ?. Any info would help guess it’s time to hit the books again at least it looks like I only have one last hurdle to clear before working on host-side code for now I will re-read my firmware to see if it holds any clues since I know the cpu WAS running durring the dual numeration! oh well.

For future reference, the process whereby a USB device is recognized and
identified is called “enumeration”, not “numeration”. Cypress has
coined the term “renumeration” for the process of getting disconnected
and re-identified with a new VID/PID, but that’s a bastardization of
English. The proper term would be “re-enumeration”.

Maybe they thought they could copyright “renumeration”. In that case,
we’d have to give them “remuneration” for using “renumeration”. But
that’s silly.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Well,
on to desktop APP stuff…
anybody out there know why this happens ? I called SetupDiGetDeviceRegistryProperty()
with a request for FriendlyName length & it claims success but the string length it returns is junk I get a large negitive number but no error ???
the inputs are as follows:
HDEVINFO, ;handle
PSP_DEVINFO_DATA, ;device info
SPDRP_FRIENDLYNAME ;operation to perform
DWORD ;reg type
NULL, ;
0, ;
DWORD ;string length.
I was sure I setup the device info did I miss something ?

Ok update,
I did some “snooping” in my code & found I had allocated a buffer for the “device path” in a prior code segment but failed to copy it to there.
Bummer still no joy!, the function SetupDiGetDeviceProperty() still claims success but delivers a bogus string length. I patched my code to ignore this set the buffer to 1k & tried to fetch the name anyway using a second call to the same function - predictably it to returns gibberish what gives !?

Found part of the problem,
my .inf file may have mounted WinUsb but it neglected to add “friendly name” to the registry - fixed that now the attempt to get string length works fine but the 2nd call still will not give me the string itself hmmm wonder why I get a boolean fail from the function but no systems error code to explain what happened ?. I know it must have found the string on the first call since the length it reports back is correct but the second call fails to yield the string, SetupDiGetDeviceRegistryProperty() is being a prickly pear to deal with. Any help on this out there ?

Bummer,
at least now I’m fairly sure what I’m why but am having problems finding an example to show me how it should look in the registery. It seems SetupDiGetDeviceRegistryProperty() gets the string length from the device’s registery key but the string it fetches from a seperate key private to the string and just to add to the joy I can’t find even one of these to use for syntax/location reference anybody out there know where this function looks for Friendlyname and or HardwareID ? it would really help I seem to be one stumbling-block short of setting up the pipes and handshaking to my PCB.