INF File Questions...

I think I have my driver ready to debug and test, but am having trouble with the .inf file. So I have tried to start with the wonderful OSR example
in WdfDio.inf. And I am trying to run mine through ChkInf. ChkInf says there is an error at Line 36 of WdfDio.inf:

[Manufacturer]
%Mfg%=MfgDeviceSection, NTAMD64
%Mfg%=MfgDeviceSection

Line 36: (E22.1.1317) Manufacturer-identifier is not unique in the [Manufacturer] section

Am I supposed to delete one of these lines based on the installation I am doing?
Thanks.

Actually, there are a few issues that ChkInf has with the .inf file:

Line 0: (W22.1.2212) No Copyright information found.
Line 12: (W22.1.2215) Class OsrHardware (ClassGUID {cfb15040-5bc7-11d3-b194-0060b0efd4aa}) is unrecognized.
Line 63: (W22.1.2083) Section [WDFDIO.NT.COINSTALLERS] not referenced
Line 67: (W22.1.2083) Section [COINSTALLER_COPYFILES] not referenced
Line 73: (W22.1.2083) Section [COINSTALLER_ADDREG] not referenced
Line 76: (W22.1.2304) KMDF Driver is not using any WDF Co-installers. This section is also intended for Win2K and below architectures. If the required
version or a higher version of the framework is not present or functioning on the system, this driver package will fail to work

I don’t understand why the warnings for the not useing WDF constallers, as they seem to be called out.
; (W22.1.2212) No Copyright information found.
;
; *** INF file for WDFDIO.SYS
; OSR’s WDF sample driver for the Sealevel DIO-24 (8008) card.
;
; Instructions:
; Stick this file in a directory with the .sys file, and install. It
; should work with either the AMD64 version or the x64 version of the driver.
; If you want an IA64 version of the driver, you’re on your own.
;
[Version]
Signature=“$WINDOWS NT$”
Class=OsrHardware
; (W22.1.2215) Class OsrHardware (ClassGUID {cfb15040-5bc7-11d3-b194-0060b0efd4aa}) is unrecognized.
ClassGuid={cfb15040-5bc7-11d3-b194-0060b0efd4aa}
Provider=“OSR Open Systems Resources, Inc.”
DriverVer=04/17/2007,2.0.0
catalogfile=wdfdio.cat

[SourceDisksNames]
1=%DiskId%

[SourceDisksFiles]
wdfdio.sys=1

[ClassInstall32]
Addreg=OsrHwClass

[OsrHwClass]
HKR,%ClassName%
HKR,Icon,“-5”

[DestinationDirs]
DefaultDestDir=12

[Manufacturer]
%Mfg%=MfgDeviceSection, NTAMD64
%Mfg%=MfgDeviceSection
; (E22.1.1317) Manufacturer-identifier is not unique in the [Manufacturer] section

[MfgDeviceSection]
%DeviceDesc% = WdfDio, PCI\VEN_135E&DEV_8008&SUBSYS_8008135E&REV_01
%DeviceDesc% = WdfDio, PCI\VEN_135E&DEV_8018&SUBSYS_8018135E&REV_01

[MfgDeviceSection.NTAMD64]
%DeviceDesc% = WdfDio, PCI\VEN_135E&DEV_8008&SUBSYS_8008135E&REV_01
%DeviceDesc% = WdfDio, PCI\VEN_135E&DEV_8018&SUBSYS_8018135E&REV_01

[WdfDio]
CopyFiles=@WdfDio.sys

[WdfDio.Services]
AddService = WdfDio,%SPSVCINST_ASSOCSERVICE%,wdfDio_Service_Inst

[WdfDio_Service_Inst]
ServiceType = %SERVICE_KERNEL_DRIVER%
StartType = %SERVICE_MANUAL_START%
ErrorControl = %SERVICE_ERROR_NORMAL%
ServiceBinary = %12%\wdfdio.sys

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

[DestinationDirs]
CoInstaller_CopyFiles = 11

[WdfDio.NT.CoInstallers]
; (W22.1.2083) Section [WDFDIO.NT.COINSTALLERS] not referenced
AddReg=CoInstaller_AddReg
CopyFiles=CoInstaller_CopyFiles

[CoInstaller_CopyFiles]
; (W22.1.2083) Section [COINSTALLER_COPYFILES] not referenced
WdfCoinstaller01000.dll

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

[CoInstaller_AddReg]
; (W22.1.2083) Section [COINSTALLER_ADDREG] not referenced
HKR,CoInstallers32,0x00010000, “WdfCoinstaller01000.dll,WdfCoInstaller”

[WdfDio.Wdf]
; (W22.1.2304) KMDF Driver is not using any WDF Co-installers. This section is also intended for Win2K and below architectures. If the required
version or a higher version of the framework is not present or functioning on the system, this driver package will fail to work
KmdfService = WdfDio, WdfDio_wdfsect
[WdfDio_wdfsect]
KmdfLibraryVersion = 1.0

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

[Strings]
ClassName =“OSR Sample Hardware Drivers”
DeviceDesc = “OSR WDF DIO Driver V2.0”
DiskId = “Install disk (1)”
Mfg = “Open Systems Resources, Inc.”
SPSVCINST_ASSOCSERVICE = 0x00000002
SERVICE_KERNEL_DRIVER = 1
SERVICE_MANUAL_START = 3
SERVICE_ERROR_NORMAL = 1

Here is the annotated .inf file:

Michael Wade wrote:

I think I have my driver ready to debug and test, but am having trouble with the .inf file. So I have tried to start with the wonderful OSR example
in WdfDio.inf. And I am trying to run mine through ChkInf. ChkInf says there is an error at Line 36 of WdfDio.inf:

[Manufacturer]
%Mfg%=MfgDeviceSection, NTAMD64
%Mfg%=MfgDeviceSection

Line 36: (E22.1.1317) Manufacturer-identifier is not unique in the [Manufacturer] section

Am I supposed to delete one of these lines based on the installation I am doing?

Yes, only include the first. That will work for both 32-bit and 64-bit
installations. There is an MSDN web page that talks about INF file
decorations:
http://www.microsoft.com/whdc/archive/64inf_reqs.mspx


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

Michael Wade wrote:

Actually, there are a few issues that ChkInf has with the .inf file:

Line 0: (W22.1.2212) No Copyright information found.
Line 12: (W22.1.2215) Class OsrHardware (ClassGUID {cfb15040-5bc7-11d3-b194-0060b0efd4aa}) is unrecognized.
Line 63: (W22.1.2083) Section [WDFDIO.NT.COINSTALLERS] not referenced
Line 67: (W22.1.2083) Section [COINSTALLER_COPYFILES] not referenced
Line 73: (W22.1.2083) Section [COINSTALLER_ADDREG] not referenced
Line 76: (W22.1.2304) KMDF Driver is not using any WDF Co-installers. This section is also intended for Win2K and below architectures. If the required version or a higher version of the framework is not present or functioning on the system, this driver package will fail to work

I don’t understand why the warnings for the not useing WDF constallers, as they seem to be called out.

Almost, but with the decorations it has to change:

[WdfDio.NT.CoInstallers]
; (W22.1.2083) Section [WDFDIO.NT.COINSTALLERS] not referenced
AddReg=CoInstaller_AddReg
CopyFiles=CoInstaller_CopyFiles

You need

[WdfDio.NTx86.CoInstallers]
AddReg=CoInstaller_AddReg
CopyFiles=CoInstaller_CopyFiles

[WdfDio.NTamd64.CoInstallers]
AddReg=CoInstaller_AddReg
CopyFiles=CoInstaller_CopyFiles

[WdfDio_wdfsect]
KmdfLibraryVersion = 1.0

Which WDK version are you using? You are probablly NOT using version
1.0 of the KMDF library. If you are using the most recent WDK, this
needs to be 1.9, not 1.0.


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

It appears that coinstallers are still not getting referenced. Is this because the section [WDFDIO.NT.COINSTALLERS] is not referenced?

; (W22.1.2212) No Copyright information found.
;
; *** INF file for WDFDIO.SYS
; OSR’s WDF sample driver for the Sealevel DIO-24 (8008) card.
;
; Instructions:
; Stick this file in a directory with the .sys file, and install. It
; should work with either the AMD64 version or the x64 version of the driver.
; If you want an IA64 version of the driver, you’re on your own.
;
[Version]
Signature=“$WINDOWS NT$”
Class=OsrHardware
; (W22.1.2215) Class OsrHardware (ClassGUID {cfb15040-5bc7-11d3-b194-0060b0efd4aa}) is unrecognized.
ClassGuid={cfb15040-5bc7-11d3-b194-0060b0efd4aa}
Provider=“OSR Open Systems Resources, Inc.”
DriverVer=04/17/2007,2.0.0
catalogfile=wdfdio.cat

[SourceDisksNames]
1=%DiskId%

[SourceDisksFiles]
wdfdio.sys=1

[ClassInstall32]
Addreg=OsrHwClass

[OsrHwClass]
HKR,%ClassName%
HKR,Icon,“-5”

[DestinationDirs]
DefaultDestDir=12

[Manufacturer]
%Mfg%=MfgDeviceSection, NTAMD64

[MfgDeviceSection]
%DeviceDesc% = WdfDio, PCI\VEN_135E&DEV_8008&SUBSYS_8008135E&REV_01
%DeviceDesc% = WdfDio, PCI\VEN_135E&DEV_8018&SUBSYS_8018135E&REV_01

[MfgDeviceSection.NTAMD64]
%DeviceDesc% = WdfDio, PCI\VEN_135E&DEV_8008&SUBSYS_8008135E&REV_01
%DeviceDesc% = WdfDio, PCI\VEN_135E&DEV_8018&SUBSYS_8018135E&REV_01

[WdfDio]
CopyFiles=@WdfDio.sys

[WdfDio.Services]
AddService = WdfDio,%SPSVCINST_ASSOCSERVICE%,wdfDio_Service_Inst

[WdfDio_Service_Inst]
ServiceType = %SERVICE_KERNEL_DRIVER%
StartType = %SERVICE_MANUAL_START%
ErrorControl = %SERVICE_ERROR_NORMAL%
ServiceBinary = %12%\wdfdio.sys

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

[DestinationDirs]
CoInstaller_CopyFiles = 11

[WdfDio.NT.CoInstallers]
; (W22.1.2083) Section [WDFDIO.NT.COINSTALLERS] not referenced
AddReg=CoInstaller_AddReg
CopyFiles=CoInstaller_CopyFiles

[CoInstaller_CopyFiles]
; (W22.1.2083) Section [COINSTALLER_COPYFILES] not referenced
WdfCoinstaller01000.dll

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

[CoInstaller_AddReg]
; (W22.1.2083) Section [COINSTALLER_ADDREG] not referenced
HKR,CoInstallers32,0x00010000, “WdfCoinstaller01000.dll,WdfCoInstaller”

[WdfDio.NTx86.CoInstallers]
; (W22.1.2083) Section [WDFDIO.NTX86.COINSTALLERS] not referenced
AddReg=CoInstaller_AddReg
CopyFiles=CoInstaller_CopyFiles

[WdfDio.NTamd64.CoInstallers]
; (W22.1.2083) Section [WDFDIO.NTAMD64.COINSTALLERS] not referenced
AddReg=CoInstaller_AddReg
CopyFiles=CoInstaller_CopyFiles

[WdfDio.Wdf]
; (W22.1.2304) KMDF Driver is not using any WDF Co-installers. This section is also intended for Win2K and below architectures. If the required
version or a higher version of the framework is not present or functioning on the system, this driver package will fail to work
KmdfService = WdfDio, WdfDio_wdfsect
[WdfDio_wdfsect]
KmdfLibraryVersion = 1.0

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

[Strings]
ClassName =“OSR Sample Hardware Drivers”
DeviceDesc = “OSR WDF DIO Driver V2.0”
DiskId = “Install disk (1)”
Mfg = “Open Systems Resources, Inc.”
SPSVCINST_ASSOCSERVICE = 0x00000002
SERVICE_KERNEL_DRIVER = 1
SERVICE_MANUAL_START = 3
SERVICE_ERROR_NORMAL = 1

On Tue, 11 Jan 2011 12:16:48 -0800, Tim Roberts wrote:

>Michael Wade wrote:
>> Actually, there are a few issues that ChkInf has with the .inf file:
>>
>> Line 0: (W22.1.2212) No Copyright information found.
>> Line 12: (W22.1.2215) Class OsrHardware (ClassGUID {cfb15040-5bc7-11d3-b194-0060b0efd4aa}) is unrecognized.
>> Line 63: (W22.1.2083) Section [WDFDIO.NT.COINSTALLERS] not referenced
>> Line 67: (W22.1.2083) Section [COINSTALLER_COPYFILES] not referenced
>> Line 73: (W22.1.2083) Section [COINSTALLER_ADDREG] not referenced
>> Line 76: (W22.1.2304) KMDF Driver is not using any WDF Co-installers. This section is also intended for Win2K and below architectures. If the required version or a higher version of the framework is not present or functioning on the system, this driver package will fail to work
>>
>> I don’t understand why the warnings for the not useing WDF constallers, as they seem to be called out.
>
>Almost, but with the decorations it has to change:
>
>
>> [WdfDio.NT.CoInstallers]
>> ; (W22.1.2083) Section [WDFDIO.NT.COINSTALLERS] not referenced
>> AddReg=CoInstaller_AddReg
>> CopyFiles=CoInstaller_CopyFiles
>
>You need
>
>[WdfDio.NTx86.CoInstallers]
>AddReg=CoInstaller_AddReg
>CopyFiles=CoInstaller_CopyFiles
>
>[WdfDio.NTamd64.CoInstallers]
>AddReg=CoInstaller_AddReg
>CopyFiles=CoInstaller_CopyFiles
>
>> [WdfDio_wdfsect]
>> KmdfLibraryVersion = 1.0
>
>Which WDK version are you using? You are probablly NOT using version
>1.0 of the KMDF library. If you are using the most recent WDK, this
>needs to be 1.9, not 1.0.

Michael Wade wrote:

It appears that coinstallers are still not getting referenced. Is this because the section [WDFDIO.NT.COINSTALLERS] is not referenced?

I believe it is because inf2cat isn’t fully cognizant of KMDF. Have you
tried an installation using this file?


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

I haven’t tried it because I don’t have the hardware, I was just using it as a sample to get started. I’m trying to go through the documentation but
it’s tough going. Like one thing I don’t understand, how can one have multiple copies of the same section with different values? Like
[DestinationDirs]
DefaultDestDir=12

[Manufacturer]
%Mfg%=MfgDeviceSection, NTAMD64


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

[DestinationDirs]
CoInstaller_CopyFiles = 11

There are two DestinationDirs?

Thanks again

On Tue, 11 Jan 2011 13:12:27 -0800, Tim Roberts wrote:

>Michael Wade wrote:
>> It appears that coinstallers are still not getting referenced. Is this because the section [WDFDIO.NT.COINSTALLERS] is not referenced?
>
>I believe it is because inf2cat isn’t fully cognizant of KMDF. Have you
>tried an installation using this file?

Michael Wade wrote:

I haven’t tried it because I don’t have the hardware, I was just using it as a sample to get started. I’m trying to go through the documentation but
it’s tough going. Like one thing I don’t understand, how can one have multiple copies of the same section with different values? Like
[DestinationDirs]
DefaultDestDir=12

[Manufacturer]
%Mfg%=MfgDeviceSection, NTAMD64


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

[DestinationDirs]
CoInstaller_CopyFiles = 11

There are two DestinationDirs?

INF files follow slightly different rules from INI files. In an INI
file, that would have been an error. In an INF file, those duplicated
sections accumulate.


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

A glorious light begins to shine…

Oh…

Thank you again!

On Tue, 11 Jan 2011 15:34:19 -0800, Tim Roberts wrote:

>Michael Wade wrote:
>> I haven’t tried it because I don’t have the hardware, I was just using it as a sample to get started. I’m trying to go through the documentation but
>> it’s tough going. Like one thing I don’t understand, how can one have multiple copies of the same section with different values? Like
>> [DestinationDirs]
>> DefaultDestDir=12
>>
>> [Manufacturer]
>> %Mfg%=MfgDeviceSection, NTAMD64
>>
>> …
>> ;-------------- WDF Coinstaller installation
>>
>> [DestinationDirs]
>> CoInstaller_CopyFiles = 11
>>
>> There are two DestinationDirs?
>
>INF files follow slightly different rules from INI files. In an INI
>file, that would have been an error. In an INF file, those duplicated
>sections accumulate.