kmdf, XP and wdfldr.sys

I have build a USB class driver using WinDDK 7600.16385.1. I can install it ok but it won’t load.

Using depends.exe it shows it needs 4 functions from wdfldr.sys which is neither in the DDK for installing or in XP SP3 (I have just confirmed this with a new install).

Can anyone advise where I can get an XP version of wdfldr.sys for XP? Can I use the version supplied with Vista for instance, or does a previous DDK/kmdf contain it.

Thanks

User the wdfcoinstaller that is the redist directory. There are a bunch of INF samples that show how to use it

d

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@shaw.ca
Sent: Saturday, July 24, 2010 10:05 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] kmdf, XP and wdfldr.sys

I have build a USB class driver using WinDDK 7600.16385.1. I can install it ok but it won’t load.

Using depends.exe it shows it needs 4 functions from wdfldr.sys which is neither in the DDK for installing or in XP SP3 (I have just confirmed this with a new install).

Can anyone advise where I can get an XP version of wdfldr.sys for XP? Can I use the version supplied with Vista for instance, or does a previous DDK/kmdf contain it.

Thanks


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

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

> Using depends.exe it shows it needs 4 functions from wdfldr.sys which is neither in the DDK for

installing or in XP SP3 (I have just confirmed this with a new install).

You must include a WDF coinstaller in your INF file, which will upgrade the OS’s KMDF version to the one your driver wants.

Note that this was (at least once) requiring a reboot, which can be a pain.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

The problem I am having is that the binary sys file built for XP has a dependency on wdfldr.sys which does not exist in XP SP3 or in the the WinDDK package, redist or otherwise.

I also found that the same dependency happens for the Vista build and whilst Vista has wdfldr.sys, the version I have of it does not have all the exports that the built sys file is expecting.

Further, I built the example projects from WinDDK (C:\WinDDK\7600.16385.1\src\usb\osrusbfx2\kmdf\sys) and it has the exact same dependency and load issue - built in XP SP3 for XP (free and checked).

According to logs (setupact.log and setupapi.log, verbose) the coinstaller installs correctly.

Two things…

  1. Has anyone else seen this and have a solution?

  2. Where can I find a previous version (I am using 7600.16385.1 of the WinDDK).

Thanks

On 2010-07-25, at 2:50 PM, Maxim S. Shatskih wrote:

> Using depends.exe it shows it needs 4 functions from wdfldr.sys which is neither in the DDK for
> installing or in XP SP3 (I have just confirmed this with a new install).

You must include a WDF coinstaller in your INF file, which will upgrade the OS’s KMDF version to the one your driver wants.

Note that this was (at least once) requiring a reboot, which can be a pain.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

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

Post your inf

d

dent from a phpne with no keynoard

-----Original Message-----
From: Veronica Merryfield
Sent: July 26, 2010 10:27 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] kmdf, XP and wdfldr.sys

The problem I am having is that the binary sys file built for XP has a dependency on wdfldr.sys which does not exist in XP SP3 or in the the WinDDK package, redist or otherwise.

I also found that the same dependency happens for the Vista build and whilst Vista has wdfldr.sys, the version I have of it does not have all the exports that the built sys file is expecting.

Further, I built the example projects from WinDDK (C:\WinDDK\7600.16385.1\src\usb\osrusbfx2\kmdf\sys) and it has the exact same dependency and load issue - built in XP SP3 for XP (free and checked).

According to logs (setupact.log and setupapi.log, verbose) the coinstaller installs correctly.

Two things…

1. Has anyone else seen this and have a solution?

2. Where can I find a previous version (I am using 7600.16385.1 of the WinDDK).

Thanks

On 2010-07-25, at 2:50 PM, Maxim S. Shatskih wrote:

>> Using depends.exe it shows it needs 4 functions from wdfldr.sys which is neither in the DDK for
>> installing or in XP SP3 (I have just confirmed this with a new install).
>
> You must include a WDF coinstaller in your INF file, which will upgrade the OS’s KMDF version to the one your driver wants.
>
> Note that this was (at least once) requiring a reboot, which can be a pain.
>
> –
> Maxim S. Shatskih
> Windows DDK MVP
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

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

My INF, FLMatUsb.inf, and the one generated from the WinDKK example project built following the instructions - osrusbfx2.inf

FLMatUsb.inf…

[Version]
Signature=“$WINDOWS NT$”
Class=FLMatUsb
ClassGUID={A1E1D140-72CF-41d8-95DD-91EF44DB952B}
Provider=%MFGNAME%
DriverVer=07/20/2010,1.0
CatalogFile=FLMatUSB.cat

[ClassInstall32]
AddReg=ClassInstall32_AddReg ;;write registry
CopyFiles=ClassInstall32_CopyFiles ;;copy the files

[ClassInstall32_AddReg]
HKR,“FLMatUsb device driver”
HKR,Icon,101

[ClassInstall32_CopyFiles]

;-------------- INF stuff

[Manufacturer] ;;top level section for device install
%MFGNAME%=FootLevelersInc ;;the name of the section that contains
;;the list of devices for %MFGNAME%
[DestinationDirs]
DefaultDestDir=12 ;;%windir%\system32\drivers this is
;;mandatory for WDM drivers.

ClassInstall32_CopyFiles=11 ;;system32 on WinNT platforms. all files
;;for the classinstall are copied to
;;this folder by default.

[SourceDisksFiles] ;;identify the files that are to be
;;copied during installation.
FLMatUsb.sys=1

[SourceDisksNames] ;;identify the source disks for the
;;files that are specified in the
;;SourceDisksFiles section
1=%Disk_Description%, ;;we only have 1 installation disk.

[FootLevelersInc] ;;Specify the list of devices that are
;;supported by our driver.
FLMatUsb=DriverInstall, USB\VID_F1F1&PID_F1F1

;-------------- Device installation

[DriverInstall.ntx86] ;;specify that this is the installation
;;for nt based systems. if no postfix is
;;specified, it is assumed that the
;;driver is installed on 9x
DriverVer=07/20/2010,1.0 ;;driver version
CopyFiles=DriverCopyFiles ;;specify the section that tells the
;;installer which files to copy.

[DriverCopyFiles]
FLMatUsb.sys,2 ;;copy sys file

[DriverInstall.ntx86.Services]
AddService=FLMatUsb,2,DriverService ;;tell the PNP manager which files to
;;load

[DriverService]
ServiceType=1 ;;kernel mode driver
StartType=3 ;;start on demand
ErrorControl=1 ;;normal error handling. the device is
;;not critical for the system.
ServiceBinary=%12%\FLMatUsb.sys
;;tell the system where the driver file
;;is located.

[DriverInstall.ntx86.hw]
AddReg=DriverHwAddReg

[DriverHwAddReg]
HKR,SampleInfo,“FLMatUsb registry key”

;-------------- WDF Coinstaller installation

[DestinationDirs]
CoInstaller_CopyFiles = 11

[DriverInstall.ntx86.CoInstallers]
AddReg=CoInstaller_AddReg
CopyFiles=CoInstaller_CopyFiles

[CoInstaller_CopyFiles]
WdfCoinstaller01009.dll

[SourceDisksFiles]
WdfCoinstaller01009.dll=1 ; make sure the number matches with SourceDisksNames

[CoInstaller_AddReg]
HKR,CoInstallers32,0x00010000, “WdfCoinstaller01009.dll,WdfCoInstaller”

[DriverInstall.ntx86.Wdf]
KmdfService = FLMatUsb, FLMatUsb_wdfsect

[FLMatUsb_wdfsect]
KmdfLibraryVersion = 1.0

;-------------- Strings

[Strings]
MSFT = “FootLevelers Inc”
MFGNAME = “FootLevelers Inc”
Disk_Description = “FLMatUsb Installation Disk”
FLMatUsb.SvcDesc = “FootLevelers FLIMat Usb Driver”
ClassName = “FLMatUsb Device”

osrusbfx2.inf…

;/*++
;
;Copyright (c) Microsoft Corporation. All rights reserved.
;
; THIS CODE AND INFORMATION IS PROVIDED “AS IS” WITHOUT WARRANTY OF ANY
; KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
; IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
; PURPOSE.
;
;Module Name:
;
; OSRUSBFX2.INF
;
;Abstract:
; Installation inf for OSR USB-FX2 Learning Kit
;
;–*/

[Version]
Signature=“$WINDOWS NT$”
Class=Sample
ClassGuid={78A1C341-4539-11d3-B88D-00C04FAD5171}
Provider=%MSFT%
DriverVer=07/25/2010,6.1.7600.16385
CatalogFile=KmdfSamples.cat

; ================= Class section =====================

[ClassInstall32]
Addreg=SampleClassReg

[SampleClassReg]
HKR,0,%ClassName%
HKR,Icon,-5

; ================= Device section =====================

[Manufacturer]
%MfgName%=Microsoft,NTx86

; For Win2K
[Microsoft]
%USB\VID_045E&PID_930A.DeviceDesc%=osrusbfx2.Dev, USB\VID_0547&PID_1002
%Switch.DeviceDesc%=Switch.Dev, {6FDE7521-1B65-48ae-B628-80BE62016026}\OsrUsbFxRawPdo

; For XP and later
[Microsoft.NTx86]
%USB\VID_045E&PID_930A.DeviceDesc%=osrusbfx2.Dev, USB\VID_0547&PID_1002
%Switch.DeviceDesc%=Switch.Dev, {6FDE7521-1B65-48ae-B628-80BE62016026}\OsrUsbFxRawPdo

[osrusbfx2.Dev.NT]
CopyFiles=osrusbfx2.Files.Ext

[Switch.Dev.NT]
;dummy section

[Switch.Dev.NT.Services]
AddService = , %SPSVCINST_ASSOCSERVICE%,

[osrusbfx2.Dev.NT.Services]
AddService = osrusbfx2, %SPSVCINST_ASSOCSERVICE%, osrusbfx2.AddService

[osrusbfx2.AddService]
DisplayName = %osrusbfx2.SvcDesc%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 3 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %10%\System32\Drivers\osrusbfx2.sys
AddReg = osrusbfx2.AddReg
LoadOrderGroup = Base

[osrusbfx2.Files.Ext]
osrusbfx2.sys

[SourceDisksNames]
1=%Disk_Description%,

[SourceDisksFiles]
osrusbfx2.sys = 1

[DestinationDirs]
DefaultDestDir = 12

;-------------- WDF Coinstaller installation

[DestinationDirs]
CoInstaller_CopyFiles = 11

[osrusbfx2.Dev.NT.CoInstallers]
AddReg=CoInstaller_AddReg
CopyFiles=CoInstaller_CopyFiles

[CoInstaller_CopyFiles]
WdfCoInstaller01009.dll

[SourceDisksFiles]
WdfCoInstaller01009.dll=1 ; make sure the number matches with SourceDisksNames

[CoInstaller_AddReg]
HKR,CoInstallers32,0x00010000, “WdfCoInstaller01009.dll,WdfCoInstaller”

[osrusbfx2.Dev.NT.Wdf]
KmdfService = osrusbfx2, osrusbfx2_wdfsect
[osrusbfx2_wdfsect]
KmdfLibraryVersion = 1.9

;---------------------------------------------------------------;

[Strings]
MSFT=“Microsoft”
MfgName=“OSR”
Disk_Description=“OSRUSBFX2 Installation Disk”
USB\VID_045E&PID_930A.DeviceDesc=“WDF Sample Driver for OSR USB-FX2 Learning Kit”
osrusbfx2.SvcDesc=“WDF Sample Driver for OSR USB-FX2 Learning Kit”
ClassName = “Sample Device”
Switch.DeviceDesc = “OsrUsbFX2 RawPdo For Switch”
SPSVCINST_ASSOCSERVICE= 0x00000002

Thanks

On 2010-07-26, at 10:44 AM, Doron Holan wrote:

Post your inf

d

dent from a phpne with no keynoard

-----Original Message-----
From: Veronica Merryfield
> Sent: July 26, 2010 10:27 AM
> To: Windows System Software Devs Interest List
> Subject: Re: [ntdev] kmdf, XP and wdfldr.sys
>
>
> The problem I am having is that the binary sys file built for XP has a dependency on wdfldr.sys which does not exist in XP SP3 or in the the WinDDK package, redist or otherwise.
>
> I also found that the same dependency happens for the Vista build and whilst Vista has wdfldr.sys, the version I have of it does not have all the exports that the built sys file is expecting.
>
> Further, I built the example projects from WinDDK (C:\WinDDK\7600.16385.1\src\usb\osrusbfx2\kmdf\sys) and it has the exact same dependency and load issue - built in XP SP3 for XP (free and checked).
>
> According to logs (setupact.log and setupapi.log, verbose) the coinstaller installs correctly.
>
> Two things…
>
> 1. Has anyone else seen this and have a solution?
>
> 2. Where can I find a previous version (I am using 7600.16385.1 of the WinDDK).
>
> Thanks
>
>
>
>
> On 2010-07-25, at 2:50 PM, Maxim S. Shatskih wrote:
>
>>> Using depends.exe it shows it needs 4 functions from wdfldr.sys which is neither in the DDK for
>>> installing or in XP SP3 (I have just confirmed this with a new install).
>>
>> You must include a WDF coinstaller in your INF file, which will upgrade the OS’s KMDF version to the one your driver wants.
>>
>> Note that this was (at least once) requiring a reboot, which can be a pain.
>>
>> –
>> Maxim S. Shatskih
>> Windows DDK MVP
>> xxxxx@storagecraft.com
>> http://www.storagecraft.com
>>
>>
>> —
>> NTDEV is sponsored by OSR
>>
>> For our schedule of WDF, WDM, debugging and other seminars visit:
>> http://www.osr.com/seminars
>>
>> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Veronica Merryfield wrote:

The problem I am having is that the binary sys file built for XP has a dependency on wdfldr.sys which does not exist in XP SP3 or in the the WinDDK package, redist or otherwise.

The WDF co-installer installs both wdf01000.sys and wdfldr.sys. The
drivers are built-in to the co-installer executable as resources. It
runs before your driver loads for the first time, so by the time your
driver is seen, the dependency is satisfied. Indeed, that is its sole
purpose in life.

Further, I built the example projects from WinDDK (C:\WinDDK\7600.16385.1\src\usb\osrusbfx2\kmdf\sys) and it has the exact same dependency and load issue - built in XP SP3 for XP (free and checked).

Of course it does. All KMDF drivers do.

According to logs (setupact.log and setupapi.log, verbose) the coinstaller installs correctly.

You should post the logs that lead you to believe this. The fact that
wdfldr.sys does not exist suggests otherwise.

Two things…

  1. Has anyone else seen this and have a solution?
  2. Where can I find a previous version (I am using 7600.16385.1 of the WinDDK).

The solution is to use the WDF co-installer. I’m sorry, but it’s just
that simple. You are doing something wrong.


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

Thank you - I got mine to work although I was looking to the examples in WinDDK to guide me and was disappointed when they failed the same way.

On 2010-07-26, at 11:47 AM, Tim Roberts wrote:

Veronica Merryfield wrote:
> The problem I am having is that the binary sys file built for XP has a dependency on wdfldr.sys which does not exist in XP SP3 or in the the WinDDK package, redist or otherwise.

The WDF co-installer installs both wdf01000.sys and wdfldr.sys. The
drivers are built-in to the co-installer executable as resources. It
runs before your driver loads for the first time, so by the time your
driver is seen, the dependency is satisfied. Indeed, that is its sole
purpose in life.

> Further, I built the example projects from WinDDK (C:\WinDDK\7600.16385.1\src\usb\osrusbfx2\kmdf\sys) and it has the exact same dependency and load issue - built in XP SP3 for XP (free and checked).

Of course it does. All KMDF drivers do.

> According to logs (setupact.log and setupapi.log, verbose) the coinstaller installs correctly.

You should post the logs that lead you to believe this. The fact that
wdfldr.sys does not exist suggests otherwise.

> Two things…
>
> 1. Has anyone else seen this and have a solution?
> 2. Where can I find a previous version (I am using 7600.16385.1 of the WinDDK).

The solution is to use the WDF co-installer. I’m sorry, but it’s just
that simple. You are doing something wrong.


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


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

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

Post your inf

d

dent from a phpne with no keynoard

-----Original Message-----
From: Veronica Merryfield
Sent: July 26, 2010 10:27 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] kmdf, XP and wdfldr.sys

The problem I am having is that the binary sys file built for XP has a dependency on wdfldr.sys which does not exist in XP SP3 or in the the WinDDK package, redist or otherwise.

I also found that the same dependency happens for the Vista build and whilst Vista has wdfldr.sys, the version I have of it does not have all the exports that the built sys file is expecting.

Further, I built the example projects from WinDDK (C:\WinDDK\7600.16385.1\src\usb\osrusbfx2\kmdf\sys) and it has the exact same dependency and load issue - built in XP SP3 for XP (free and checked).

According to logs (setupact.log and setupapi.log, verbose) the coinstaller installs correctly.

Two things…

1. Has anyone else seen this and have a solution?

2. Where can I find a previous version (I am using 7600.16385.1 of the WinDDK).

Thanks

On 2010-07-25, at 2:50 PM, Maxim S. Shatskih wrote:

>> Using depends.exe it shows it needs 4 functions from wdfldr.sys which is neither in the DDK for
>> installing or in XP SP3 (I have just confirmed this with a new install).
>
> You must include a WDF coinstaller in your INF file, which will upgrade the OS’s KMDF version to the one your driver wants.
>
> Note that this was (at least once) requiring a reboot, which can be a pain.
>
> –
> Maxim S. Shatskih
> Windows DDK MVP
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

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