From: Ted Goodridge, Jr. on 5 Jan 2007 15:06 Hey everyone, Just taking the plunge into writing a driver for my new job. I searched the forums and google first, so I apologize if I missed something that has already been covered. I'm new to driver authoring, but the WDK has made things a lot easier. I have been having problems with my INF file failing to install. It dies right after copying theWdf co-installer (in Windows XP) statinig : "An error occured in the installation of the device: The required line was not found in the INF." I've tried this file with both the KmdfLibrary versions set to 1.0 and 1.5 as follows, but it seems to die in the same exact place. ======================= KmdfLibraryVersion = 1.0 and KmdfLibraryVersion = 1.5 The gist of this driver is just a customized control interface using bulk mass transfer endpoints. Below is the INF file with the names and VID/PID's removed to protect the innocent. Any input would be greatly appreciated, as I am the only person in the company responsible for windows drivers. Thanks in advance! ======================================================= ; ; UMDFMYDevice.inf ; [Version] Signature="$Windows NT$" Class=Sample ClassGuid={78A1C341-4539-11d3-B88D-00C04FAD5171} Provider=%MYCOMPANY% DriverVer=01/04/2007,6.0.6000.16386 CatalogFile=WUDF.cat [Manufacturer] %MYCOMPANY%=Microsoft,NTx86 [Microsoft.NTx86] %USBControl%=MYDevice_Install, USB\VID_XXXX&PID_YYYY [ClassInstall32] AddReg=SampleClass_RegistryAdd [SampleClass_RegistryAdd] HKR,,,,%ClassName% HKR,,Icon,,"-10" [SourceDisksFiles] UMDFMYDevice.DLL=1 WudfUpdate_01005.dll=1 WdfCoInstaller01005.dll=1 [SourceDisksNames] 1 = %MediaDescription% ; =================== UMDF MYDevice Control Device ================================ [MYDevice_Install.NT] CopyFiles=UMDriverCopy Include=WINUSB.INF ; Import sections from WINUSB.INF Needs=WINUSB.NT ; Run the CopyFiles & AddReg directives for WinUsb.INF [MYDevice_Install.NT.hw] AddReg=MYDevice_Device_AddReg [MYDevice_Install.NT.Services] AddService=WUDFRd,0x000001fa,WUDFRD_ServiceInstall ; flag 0x2 sets this as the service for the device AddService=WinUsb,0x000001f8,WinUsb_ServiceInstall ; this service is installed because its a filter. [MYDevice_Install.NT.Wdf] KmdfService = WINUSB, WinUsb_Install UmdfDispatcher=WinUsb UmdfService=UMDFMYDevice, UMDFMYDevice_Install UmdfServiceOrder=UMDFMYDevice [MYDevice_Install.NT.CoInstallers] AddReg=CoInstallers_AddReg CopyFiles=CoInstallers_CopyFiles [WinUsb_Install] KmdfLibraryVersion = 1.0 [UDMFMYDevice_Install] UmdfLibraryVersion=1.5.0 DriverCLSID= "{9FEA4A80-9BAA-4da0-9B68-0F79486BAFB5}" ServiceBinary=%12%\UMDF\UMDFMYDevice.DLL [MYDevice_Device_AddReg] HKR,,"LowerFilters",0x00010008,"WinUsb" ; FLG_ADDREG_TYPE_MULTI_SZ | FLG_ADDREG_APPEND [WUDFRD_ServiceInstall] DisplayName = %WudfRdDisplayName% ServiceType = 1 StartType = 3 ErrorControl = 1 ServiceBinary = %12%\WUDFRd.sys LoadOrderGroup = Base [WinUsb_ServiceInstall] DisplayName = %WinUsb_SvcDesc% ServiceType = 1 StartType = 3 ErrorControl = 1 ServiceBinary = %12%\WinUSB.sys [CoInstallers_AddReg] HKR,,CoInstallers32,0x00010000,"WudfUpdate_01005.dll", "WdfCoInstaller01005.dll,WdfCoInstaller" [CoInstallers_CopyFiles] WudfUpdate_01005.dll WdfCoInstaller01005.dll [DestinationDirs] UMDriverCopy=12,UMDF ; copy to driversMdf CoInstallers_CopyFiles=11 [UMDriverCopy] UMDFMYDevice.DLL ; =================== Generic ================================== [Strings] MYCOMPANY="MYCOMPANY String" MediaDescription="MYDevice" ClassName="WUDF Sample" WudfRdDisplayName="Windows Driver Foundation - User-mode Driver For MYDevice" USBControl="My Device Driver" WinUsb_SvcDesc="WinUSB Driver"
From: Ted Goodridge, Jr. on 8 Jan 2007 16:13 That initial problem is fixed. Now I'm having an issue with WinUSB. I do have new errors now, mostly with the getting the driver service WinUSB to install and initialize properly. Here is the updated INF file (with the brand names, company names, and VID/PID's removed.). After that are the relevant portions from the error logs. ; ; UMDFMyDevice.inf - Install the User Mode MyDevice Driver ; [Version] Signature="$Windows NT$" Class=Sample ClassGuid={78A1C341-4539-11d3-B88D-00C04FAD5171} Provider=%MYCOMPANY% DriverVer=01/08/2007,6.0.6000.16386 CatalogFile=WUDF.cat [Manufacturer] %LOWRANCE%=Microsoft,NTx86 [Microsoft.NTx86] %MyDevice500Control%=MyDevice_Install, USB\VID_XXXX&PID_YYYY [ClassInstall32] AddReg=SampleClass_RegistryAdd [SampleClass_RegistryAdd] HKR,,,,%ClassName% HKR,,Icon,,"-10" [SourceDisksFiles] UMDFMyDevice.DLL=1 WudfUpdate_01005.dll=1 WdfCoInstaller01005.dll=1 [SourceDisksNames] 1 = %MediaDescription% ; =================== UMDF MyDevice Control Device ================================ [MyDevice_Install.NT] CopyFiles=UMDriverCopy Include=WINUSB.INF ; Import sections from WINUSB.INF Needs=WINUSB.NT ; Run the CopyFiles & AddReg directives for WinUsb.INF [MyDevice_Install.NT.hw] AddReg=MyDevice_Device_AddReg [MyDevice_Install.NT.Services] AddService=WUDFRd,0x000001fa,WUDFRD_ServiceInstall ; flag 0x2 sets this as the service for the device AddService=WinUsb,0x000001f8,WinUsb_ServiceInstall ; this service is installed because its a filter. [MyDevice_Install.NT.Wdf] KmdfService = WINUSB, WinUsb_Install UmdfDispatcher=WinUsb UmdfService=WUDFMyDevice, WUDFMyDevice_Install UmdfServiceOrder=WUDFMyDevice [MyDevice_Install.NT.CoInstallers] AddReg=CoInstallers_AddReg CopyFiles=CoInstallers_CopyFiles [WinUsb_Install] KmdfLibraryVersion = 1.5 [WUDFMyDevice_Install] UmdfLibraryVersion=1.5.0 DriverCLSID= "{9FEA4A80-9BAA-4da0-9B68-0F79486BAFB5}" ServiceBinary=%12%\UMDF\UMDFMyDevice.DLL [MyDevice_Device_AddReg] HKR,,"LowerFilters",0x00010008,"WinUsb" ; FLG_ADDREG_TYPE_MULTI_SZ | FLG_ADDREG_APPEND [WUDFRD_ServiceInstall] DisplayName = %WudfRdDisplayName% ServiceType = 1 StartType = 3 ErrorControl = 1 ServiceBinary = %12%\WUDFRd.sys LoadOrderGroup = Base [WinUsb_ServiceInstall] DisplayName = %WinUsb_SvcDesc% ServiceType = 1 StartType = 3 ErrorControl = 1 ServiceBinary = %12%\WinUSB.sys [CoInstallers_AddReg] HKR,,CoInstallers32,0x00010000,"WudfUpdate_01005.dll", "WdfCoInstaller01005.dll,WdfCoInstaller","WinUSBCoInstaller.dll" [CoInstallers_CopyFiles] WudfUpdate_01005.dll WdfCoInstaller01005.dll WinUSBCoInstaller.dll [DestinationDirs] UMDriverCopy=12,UMDF ; copy to driversMdf CoInstallers_CopyFiles=11 [UMDriverCopy] UMDFMyDevice.DLL ; =================== Generic ================================== [Strings] MYCOMPANY="My Company" MediaDescription="MyDevice" ClassName="WUDF Sample" WudfRdDisplayName="Windows Driver Foundation - User-mode Driver For MyDevice" MyDevice500Control="MyDevice Control Module for MyDevice 500" WinUsb_SvcDesc="WinUSB Driver" ---------------------------------------------------------------- Setupapi.log -------------------------------------------------------------- #-166 Device install function: DIF_REGISTER_COINSTALLERS. #I056 Coinstallers registered. #-166 Device install function: DIF_INSTALLINTERFACES. #-011 Installing section [MyDevice_Install.NT.Interfaces] from "c:\projects\__testprojects\MyDevicedriver\MyDevicedriver\objfre_wlh_x86\i386\umdfMyDevice.inf". #I054 Interfaces installed. #-166 Device install function: DIF_INSTALLDEVICE. #I123 Doing full install of "USB\VID_XXXX&PID_YYYY\5&19F2438F&0&2". #E360 An unsigned or incorrectly signed file "c:\..\umdfmydevice.inf" for driver "MyDevice Control Module for MyDevice 500" will be installed (Policy=Ignore). Error 0xe000022f: The third-party INF does not contain digital signature information. #I163 Device not started: Device has problem: 0x0a: CM_PROB_FAILED_START. #I121 Device install of "USB\VID_XXXX&PID_YYYY\5&19F2438F&0&2" finished successfully. ----------------------------------------------------------------------------------------------------- Setupact.log : This is where I think something is going wrong with WinUSB! ---------------------------------------------------------------------- [01/08/2007 14:19.58.501] WudfUpdate: Locating resource stream WUDF_UPDATE_XP. [01/08/2007 14:19.58.548] WudfUpdate: unpacking update from resource to Microsoft User-Mode Driver Framework Install-v1.0-WinXP.exe. [01/08/2007 14:19.58.564] WudfUpdate: Temporary path is C:\WINDOWS\Temp\WDF32A.tmp. [01/08/2007 14:19.58.720] WudfUpdate: Invoking update with command line "/quiet /ER /log:"%WINDIR%\temp\wudf_update.log"". [01/08/2007 14:19.58.751] WudfUpdate: Invoking ""C:\WINDOWS\Temp\WDF32A.tmp\Microsoft User-Mode Driver Framework Install-v1.0-WinXP.exe" /quiet /ER /log:"C:\WINDOWS\temp\wudf_update.log"". [01/08/2007 14:19.58.845] WudfUpdate: Waiting for update to terminate. [01/08/2007 14:20.00.688] WudfUpdate: Update process returned 63745. [01/08/2007 14:20.00.704] WudfUpdate: WUDF was already installed. [01/08/2007 14:20.00.735] WudfUpdate: Cleaning up update. [01/08/2007 14:20.00.782] WudfUpdate: Loading configuration coinstaller from C:\WINDOWS\system32\wudfcoinstaller.dll. [01/08/2007 14:20.00.813] WudfCoInstaller: ReadWdfSection: Checking WdfSection [MyDevice_Install.NT.Wdf] [01/08/2007 14:20.00.845] WudfCoInstaller: Using I/O dispatcher WinUSB. [01/08/2007 14:20.00.892] WudfCoInstaller: UMDF Service WUDFMyDevice is already installed - removing existing settings in preparation for setting new ones. [01/08/2007 14:20.00.923] WudfCoInstaller: Configuring UMDF Service WUDFMyDevice. [01/08/2007 14:20.00.954] WudfCoInstaller: UmdfDispatcher set to WinUSB [01/08/2007 14:20.01.001] WudfCoInstaller: Binpath for service WudfPf already allows service to be loaded at boot time. [01/08/2007 14:20.01.235] WudfCoInstaller: Service WudfPf is already running. [01/08/2007 14:20.01.251] WudfCoInstaller: Service WudfSvc is already running. [01/08/2007 14:20.01.282] WudfCoInstaller: Final status: error(0) The operation completed successfully. WdfCoInstaller: [01/08/2007 14:20.01.345] DIF_INSTALLDEVICE: Pre-Processing WdfCoInstaller: [01/08/2007 14:20.01.376] ReadComponents: WdfSection for Driver Service WINUSB using KMDF lib version Major 0x1, minor 0x0 WdfCoInstaller: [01/08/2007 14:20.01.438] DIF_INSTALLDEVICE: GetLatestInstalledVersion install version major 0x1, minor 0x5 build 0x1770 is less than or equal to latest major 0x1, minor 0x5, build 0x1770 asking for post processing WdfCoInstaller: [01/08/2007 14:20.02.110] DIF_INSTALLDEVICE: Post-Processing WdfCoInstaller: [01/08/2007 14:20.02.142] BootApplication: could not open service WINUSB, error error(1060) The specified service does not exist as an installed service. WdfCoInstaller: [01/08/2007 14:20.02.173] BootApplication: GetStartType error error(87) The parameter is incorrect. Driver Service name WINUSB WdfCoInstaller: [01/08/2007 14:20.02.407] GetServiceKeyHandle: RegOpenKeyEx(HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\WINUSB) WdfCoInstaller: [01/08/2007 14:20.02.454] GetServiceKeyHandle failed: error(2) The system cannot find the file specified. WdfCoInstaller: [01/08/2007 14:20.02.501] GetDriverImageNameFromServiceName : GetServiceKeyHandle failed error: error(87) The parameter is incorrect. serviceName WINUSB WdfCoInstaller: [01/08/2007 14:20.02.563] GenerateDriverServiceMarker: GetDriverImageNameFromServiceName failed: error(87) The parameter is incorrect. for service WINUSB WdfCoInstaller: [01/08/2007 14:20.02.595] GetServiceKeyHandle: RegOpenKeyEx(HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\WINUSB) WdfCoInstaller: [01/08/2007 14:20.02.642] GetServiceKeyHandle failed: error(2) The system cannot find the file specified. WdfCoInstaller: [01/08/2007 14:20.02.688] SetCoinstallerVersion: GetServiceKeyHandle failed: for service WINUSB [01/08/2007 14:20.02.767] WudfCoInstaller: Created marker file C:\WINDOWS\system32\drivers\umdf\Msft_User_UMDFMyDevice_01_05_00.Wdf. [01/08/2007 14:20.31.297] WudfUpdate: Locating resource stream WUDF_UPDATE_XP. [01/08/2007 14:20.31.329] WudfUpdate: unpacking update from resource to Microsoft User-Mode Driver Framework Install-v1.0-WinXP.exe. [01/08/2007 14:20.31.360] WudfUpdate: Temporary path is C:\WINDOWS\Temp\WDF332.tmp. [01/08/2007 14:20.31.485] WudfUpdate: Invoking update with command line "/quiet /ER /log:"%WINDIR%\temp\wudf_update.log"". [01/08/2007 14:20.31.532] WudfUpdate: Invoking ""C:\WINDOWS\Temp\WDF332.tmp\Microsoft User-Mode Driver Framework Install-v1.0-WinXP.exe" /quiet /ER /log:"C:\WINDOWS\temp\wudf_update.log"". [01/08/2007 14:20.31.594] WudfUpdate: Waiting for update to terminate. [01/08/2007 14:20.33.532] WudfUpdate: Update process returned 63745. [01/08/2007 14:20.33.547] WudfUpdate: WUDF was already installed. [01/08/2007 14:20.33.594] WudfUpdate: Cleaning up update. [01/08/2007 14:20.33.626] WudfUpdate: Loading configuration coinstaller from C:\WINDOWS\system32\wudfcoinstaller.dll. [01/08/2007 14:20.33.657] WudfCoInstaller: ReadWdfSection: Checking WdfSection [MyDevice_Install.NT.Wdf] [01/08/2007 14:20.33.704] WudfCoInstaller: Using I/O dispatcher WinUSB. [01/08/2007 14:20.33.735] WudfCoInstaller: UMDF Service WUDFMyDevice is already installed - removing existing settings in preparation for setting new ones. [01/08/2007 14:20.33.766] WudfCoInstaller: Configuring UMDF Service WUDFMyDevice. [01/08/2007 14:20.33.813] WudfCoInstaller: UmdfDispatcher set to WinUSB [01/08/2007 14:20.33.844] WudfCoInstaller: Binpath for service WudfPf already allows service to be loaded at boot time. [01/08/2007 14:20.34.110] WudfCoInstaller: Service WudfPf is already running. [01/08/2007 14:20.34.141] WudfCoInstaller: Service WudfSvc is already running. [01/08/2007 14:20.34.172] WudfCoInstaller: Final status: error(0) The operation completed successfully. WdfCoInstaller: [01/08/2007 14:20.34.219] DIF_INSTALLDEVICE: Pre-Processing WdfCoInstaller: [01/08/2007 14:20.34.251] ReadComponents: WdfSection for Driver Service WINUSB using KMDF lib version Major 0x1, minor 0x5 WdfCoInstaller: [01/08/2007 14:20.34.282] DIF_INSTALLDEVICE: GetLatestInstalledVersion install version major 0x1, minor 0x5 build 0x1770 is less than or equal to latest major 0x1, minor 0x5, build 0x1770 asking for post processing [01/08/2007 14:20.34.329] WinusbUpdate: Looking for resource WINUSB_INSTALLER_RESOURCE [01/08/2007 14:20.34.376] WinusbUpdate: Locating resource stream WINUSB_INSTALLER_RESOURCE. [01/08/2007 14:20.34.407] WinusbUpdate: unpacking update from resource to Microsoft WinUsb Install-v1.0.exe. [01/08/2007 14:20.34.438] WinusbUpdate: Temporary path is C:\WINDOWS\Temp\Win333.tmp. [01/08/2007 14:20.34.532] WinusbUpdate: Invoking update with command line "/quiet /ER /log:"%WINDIR%\temp\winusb_update.log"". [01/08/2007 14:20.34.579] WinusbUpdate: Invoking ""C:\WINDOWS\Temp\Win333.tmp\Microsoft WinUsb Install-v1.0.exe" /quiet /ER /log:"C:\WINDOWS\temp\winusb_update.log"". [01/08/2007 14:20.34.641] WinusbUpdate: Waiting for update to terminate. [01/08/2007 14:20.52.375] WinusbUpdate: Update process returned 0. [01/08/2007 14:20.52.407] WinusbUpdate: Cleaning up update. WdfCoInstaller: [01/08/2007 14:20.55.907] DIF_INSTALLDEVICE: Post-Processing [01/08/2007 14:20.56.125] WudfCoInstaller: Created marker file C:\WINDOWS\system32\drivers\umdf\Msft_User_UMDFMyDevice_01_05_00.Wdf. ------------------------------------------
|
Pages: 1 Prev: Installing drivers during app install? Next: Selective suspend & stand by |