Kmdf USB driver "co-installer" in inf file

Is Co-installer is mandatory for the KMDF usb driver?

How can i properly incorporate the co-insaller section in my inf file.

Below is my inf file with the co-installer section.

/////////Inf file

[Version]
Signature=“$CHICAGO$”
Class=Ports
ClassGUID={4d36e978-e325-11ce-bfc1-08002be10318}
Provider=%testdriver%
DriverVer=8/3/2004,2.0.0

[Manufacturer]
%testdriver%=MRI

[MRI]
%testdriverUSBSerial%=testdriver.Install,USB\VID_YYYY&PID_XXXX

[DestinationDirs]
testdriver.Files.Driver.NT=10,System32\Drivers

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Windows XP

[Wdm1.Install.NT]
CopyFiles=Wdm1.Files.Driver.NT

[testdriver.Install.NT]
CopyFiles=testdriver.Files.Driver.NT
Include=MSPORTS.INF
Needs=SerialEnumerator.NT
AddReg=testdriver.NT.AddReg

[SourceDisksNames.NT]
1=“TESTInstallation Disk”,

[testdriver.Files.Driver.NT]
testsysF.sys

[testdriver.Install.NT.Services]
Include=MSPORTS.INF
Needs=SerialEnumerator.NT.Services
AddService = testdriver, %SPSVCINST_ASSOCSERVICE%, testdriver.Service

[testdriver.Install.NT.HW]
AddReg=testdriver.NT.HW.AddReg

[testdriver.NT.AddReg]
HKR,PortSubClass,1,01
HKR,EnumPropPages32,“MsPorts.dll,SerialPortPropPageProvider”

[testdriver.NT.HW.AddReg]
HKR,“UpperFilters”,0x00010000,“serenum”

[testdriver.Service]
DisplayName = %testdriver.ServiceName%
ServiceType = %SERVICE_KERNEL_DRIVER%
StartType = %SERVICE_DEMAND_START%
ErrorControl = %SERVICE_ERROR_NORMAL%
ServiceBinary = %10%\System32\Drivers\testsysF.sys

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

[DestinationDirs]
CoInstaller_CopyFiles = 11

[testsysF.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”

[testsysF.Dev.NT.Wdf]
KmdfService = testsysF, testsysF_wdfsect
[testsysF_wdfsect]
KmdfLibraryVersion = 1.9
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; Strings

[Strings]
Std = “(Standard port types)”
TEST= “testdriver Inc.”
testdriverUSBSerial =“TEST USB Driver”
testdriver.ServiceName=“TEST Service”
SPSVCINST_ASSOCSERVICE=0x00000002
COPYFLG_NOSKIP=2
SERVICE_KERNEL_DRIVER=1
SERVICE_AUTO_START=2
SERVICE_DEMAND_START=3
SERVICE_ERROR_NORMAL=1
//////////

Thanks in advance, plz help.

Given you have developed a WDF, the answer is yes. Where are you installing the driver? Vista? XP? Win7? For any of those other than Win7 you will have to update the WDFCoInstaller, and that may cause a reboot.

Gary G. Little

----- Original Message -----
From: “basanth kolthur”
To: “Windows System Software Devs Interest List”
Sent: Tuesday, December 7, 2010 4:20:04 AM
Subject: [ntdev] Kmdf USB driver “co-installer” in inf file

Is Co-installer is mandatory for the KMDF usb driver?

How can i properly incorporate the co-insaller section in my inf file.

Below is my inf file with the co-installer section.

/////////Inf file

[Version]
Signature=“$CHICAGO$”
Class=Ports
ClassGUID={4d36e978-e325-11ce-bfc1-08002be10318}
Provider=%testdriver%
DriverVer=8/3/2004,2.0.0

[Manufacturer]
%testdriver%=MRI

[MRI]
%testdriverUSBSerial%=testdriver.Install,USB\VID_YYYY&PID_XXXX

[DestinationDirs]
testdriver.Files.Driver.NT=10,System32\Drivers

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Windows XP

[Wdm1.Install.NT]
CopyFiles=Wdm1.Files.Driver.NT

[testdriver.Install.NT]
CopyFiles=testdriver.Files.Driver.NT
Include=MSPORTS.INF
Needs=SerialEnumerator.NT
AddReg=testdriver.NT.AddReg

[SourceDisksNames.NT]
1=“TESTInstallation Disk”,

[testdriver.Files.Driver.NT]
testsysF.sys

[testdriver.Install.NT.Services]
Include=MSPORTS.INF
Needs=SerialEnumerator.NT.Services
AddService = testdriver, %SPSVCINST_ASSOCSERVICE%, testdriver.Service

[testdriver.Install.NT.HW]
AddReg=testdriver.NT.HW.AddReg

[testdriver.NT.AddReg]
HKR,PortSubClass,1,01
HKR,EnumPropPages32,“MsPorts.dll,SerialPortPropPageProvider”

[testdriver.NT.HW.AddReg]
HKR,“UpperFilters”,0x00010000,“serenum”

[testdriver.Service]
DisplayName = %testdriver.ServiceName%
ServiceType = %SERVICE_KERNEL_DRIVER%
StartType = %SERVICE_DEMAND_START%
ErrorControl = %SERVICE_ERROR_NORMAL%
ServiceBinary = %10%\System32\Drivers\testsysF.sys

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

[DestinationDirs]
CoInstaller_CopyFiles = 11

[testsysF.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”

[testsysF.Dev.NT.Wdf]
KmdfService = testsysF, testsysF_wdfsect
[testsysF_wdfsect]
KmdfLibraryVersion = 1.9
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; Strings

[Strings]
Std = “(Standard port types)”
TEST= “testdriver Inc.”
testdriverUSBSerial =“TEST USB Driver”
testdriver.ServiceName=“TEST Service”
SPSVCINST_ASSOCSERVICE=0x00000002
COPYFLG_NOSKIP=2
SERVICE_KERNEL_DRIVER=1
SERVICE_AUTO_START=2
SERVICE_DEMAND_START=3
SERVICE_ERROR_NORMAL=1
//////////

Thanks in advance, plz help.


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

Thanks,

Yes, using win XP-32.

in my inf file i included the “co-installer section”, but not loading. is there any parameter i left.

please let me know, why it is not loading. is the format is correct?

/////////Inf file

[Version]
Signature=“$CHICAGO$”
Class=Ports
ClassGUID={4d36e978-e325-11ce-bfc1-08002be10318}
Provider=%testdriver%
DriverVer=8/3/2004,2.0.0

[Manufacturer]
%testdriver%=MRI

[MRI]
%testdriverUSBSerial%=testdriver.Install,USB\VID_YYYY&PID_XXXX

[DestinationDirs]
testdriver.Files.Driver.NT=10,System32\Drivers

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Windows XP

[Wdm1.Install.NT]
CopyFiles=Wdm1.Files.Driver.NT

[testdriver.Install.NT]
CopyFiles=testdriver.Files.Driver.NT
Include=MSPORTS.INF
Needs=SerialEnumerator.NT
AddReg=testdriver.NT.AddReg

[SourceDisksNames.NT]
1=“TESTInstallation Disk”,

[testdriver.Files.Driver.NT]
testsysF.sys

[testdriver.Install.NT.Services]
Include=MSPORTS.INF
Needs=SerialEnumerator.NT.Services
AddService = testdriver, %SPSVCINST_ASSOCSERVICE%, testdriver.Service

[testdriver.Install.NT.HW]
AddReg=testdriver.NT.HW.AddReg

[testdriver.NT.AddReg]
HKR,PortSubClass,1,01
HKR,EnumPropPages32,“MsPorts.dll,SerialPortPropPageProvider”

[testdriver.NT.HW.AddReg]
HKR,“UpperFilters”,0x00010000,“serenum”

[testdriver.Service]
DisplayName = %testdriver.ServiceName%
ServiceType = %SERVICE_KERNEL_DRIVER%
StartType = %SERVICE_DEMAND_START%
ErrorControl = %SERVICE_ERROR_NORMAL%
ServiceBinary = %10%\System32\Drivers\testsysF.sys

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

[DestinationDirs]
CoInstaller_CopyFiles = 11

[testsysF.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”

[testsysF.Dev.NT.Wdf]
KmdfService = testsysF, testsysF_wdfsect
[testsysF_wdfsect]
KmdfLibraryVersion = 1.9
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; Strings

[Strings]
Std = “(Standard port types)”
TEST= “testdriver Inc.”
testdriverUSBSerial =“TEST USB Driver”
testdriver.ServiceName=“TEST Service”
SPSVCINST_ASSOCSERVICE=0x00000002
COPYFLG_NOSKIP=2
SERVICE_KERNEL_DRIVER=1
SERVICE_AUTO_START=2
SERVICE_DEMAND_START=3
SERVICE_ERROR_NORMAL=1
//////////

Again, I have to assume since you have not said … XP did not support WDF until late in it’s life cycle, SP3 I believe. Given that you have built a WDF driver using WDK 7.1, again I can only assume this since your INF file references the 1.9 version of KMDF. You have to first install the XP service pack that supports WDF and then install the 1.9 version of the WDFCoinstaller. Check out the nonpnp example of the WDK under …\src\general\ioctl\kmdf .

Gary G. Little

----- Original Message -----
From: “basanth kolthur”
To: “Windows System Software Devs Interest List”
Sent: Tuesday, December 7, 2010 8:02:08 AM
Subject: RE:[ntdev] Kmdf USB driver “co-installer” in inf file

Thanks,

Yes, using win XP-32.

in my inf file i included the “co-installer section”, but not loading. is there any parameter i left.

please let me know, why it is not loading. is the format is correct?

/////////Inf file

[Version]
Signature=“$CHICAGO$”
Class=Ports
ClassGUID={4d36e978-e325-11ce-bfc1-08002be10318}
Provider=%testdriver%
DriverVer=8/3/2004,2.0.0

[Manufacturer]
%testdriver%=MRI

[MRI]
%testdriverUSBSerial%=testdriver.Install,USB\VID_YYYY&PID_XXXX

[DestinationDirs]
testdriver.Files.Driver.NT=10,System32\Drivers

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Windows XP

[Wdm1.Install.NT]
CopyFiles=Wdm1.Files.Driver.NT

[testdriver.Install.NT]
CopyFiles=testdriver.Files.Driver.NT
Include=MSPORTS.INF
Needs=SerialEnumerator.NT
AddReg=testdriver.NT.AddReg

[SourceDisksNames.NT]
1=“TESTInstallation Disk”,

[testdriver.Files.Driver.NT]
testsysF.sys

[testdriver.Install.NT.Services]
Include=MSPORTS.INF
Needs=SerialEnumerator.NT.Services
AddService = testdriver, %SPSVCINST_ASSOCSERVICE%, testdriver.Service

[testdriver.Install.NT.HW]
AddReg=testdriver.NT.HW.AddReg

[testdriver.NT.AddReg]
HKR,PortSubClass,1,01
HKR,EnumPropPages32,“MsPorts.dll,SerialPortPropPageProvider”

[testdriver.NT.HW.AddReg]
HKR,“UpperFilters”,0x00010000,“serenum”

[testdriver.Service]
DisplayName = %testdriver.ServiceName%
ServiceType = %SERVICE_KERNEL_DRIVER%
StartType = %SERVICE_DEMAND_START%
ErrorControl = %SERVICE_ERROR_NORMAL%
ServiceBinary = %10%\System32\Drivers\testsysF.sys

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

[DestinationDirs]
CoInstaller_CopyFiles = 11

[testsysF.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”

[testsysF.Dev.NT.Wdf]
KmdfService = testsysF, testsysF_wdfsect
[testsysF_wdfsect]
KmdfLibraryVersion = 1.9
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; Strings

[Strings]
Std = “(Standard port types)”
TEST= “testdriver Inc.”
testdriverUSBSerial =“TEST USB Driver”
testdriver.ServiceName=“TEST Service”
SPSVCINST_ASSOCSERVICE=0x00000002
COPYFLG_NOSKIP=2
SERVICE_KERNEL_DRIVER=1
SERVICE_AUTO_START=2
SERVICE_DEMAND_START=3
SERVICE_ERROR_NORMAL=1
//////////


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

Sorry,

It is SP3, and KMDF ver 1.9.

i will check it out.

Thanks

IIRC, no version of xp, regardless of SP, has kmdf in it out of the box. Vista was the first release to ship with WDF.

d

dent from a phpne with no keynoard


From: Gary G. Little
Sent: December 07, 2010 6:49 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Kmdf USB driver “co-installer” in inf file

Again, I have to assume since you have not said … XP did not support WDF until late in it’s life cycle, SP3 I believe. Given that you have built a WDF driver using WDK 7.1, again I can only assume this since your INF file references the 1.9 version of KMDF. You have to first install the XP service pack that supports WDF and then install the 1.9 version of the WDFCoinstaller. Check out the nonpnp example of the WDK under …\src\general\ioctl\kmdf.

Gary G. Little

----- Original Message -----
From: “basanth kolthur”
To: “Windows System Software Devs Interest List”
Sent: Tuesday, December 7, 2010 8:02:08 AM
Subject: RE:[ntdev] Kmdf USB driver “co-installer” in inf file

Thanks,

Yes, using win XP-32.

in my inf file i included the “co-installer section”, but not loading. is there any parameter i left.

please let me know, why it is not loading. is the format is correct?

/////////Inf file

[Version]
Signature=“$CHICAGO$”
Class=Ports
ClassGUID={4d36e978-e325-11ce-bfc1-08002be10318}
Provider=%testdriver%
DriverVer=8/3/2004,2.0.0

[Manufacturer]
%testdriver%=MRI

[MRI]
%testdriverUSBSerial%=testdriver.Install,USB\VID_YYYY&PID_XXXX

[DestinationDirs]
testdriver.Files.Driver.NT=10,System32\Drivers

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Windows XP

[Wdm1.Install.NT]
CopyFiles=Wdm1.Files.Driver.NT

[testdriver.Install.NT]
CopyFiles=testdriver.Files.Driver.NT
Include=MSPORTS.INF
Needs=SerialEnumerator.NT
AddReg=testdriver.NT.AddReg

[SourceDisksNames.NT]
1=“TESTInstallation Disk”,

[testdriver.Files.Driver.NT]
testsysF.sys

[testdriver.Install.NT.Services]
Include=MSPORTS.INF
Needs=SerialEnumerator.NT.Services
AddService = testdriver, %SPSVCINST_ASSOCSERVICE%, testdriver.Service

[testdriver.Install.NT.HW]
AddReg=testdriver.NT.HW.AddReg

[testdriver.NT.AddReg]
HKR,PortSubClass,1,01
HKR,EnumPropPages32,“MsPorts.dll,SerialPortPropPageProvider”

[testdriver.NT.HW.AddReg]
HKR,“UpperFilters”,0x00010000,“serenum”

[testdriver.Service]
DisplayName = %testdriver.ServiceName%
ServiceType = %SERVICE_KERNEL_DRIVER%
StartType = %SERVICE_DEMAND_START%
ErrorControl = %SERVICE_ERROR_NORMAL%
ServiceBinary = %10%\System32\Drivers\testsysF.sys

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

[DestinationDirs]
CoInstaller_CopyFiles = 11

[testsysF.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”

[testsysF.Dev.NT.Wdf]
KmdfService = testsysF, testsysF_wdfsect
[testsysF_wdfsect]
KmdfLibraryVersion = 1.9
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; Strings

[Strings]
Std = “(Standard port types)”
TEST= “testdriver Inc.”
testdriverUSBSerial =“TEST USB Driver”
testdriver.ServiceName=“TEST Service”
SPSVCINST_ASSOCSERVICE=0x00000002
COPYFLG_NOSKIP=2
SERVICE_KERNEL_DRIVER=1
SERVICE_AUTO_START=2
SERVICE_DEMAND_START=3
SERVICE_ERROR_NORMAL=1
//////////


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

xxxxx@gmail.com wrote:


[MRI]
%testdriverUSBSerial%=testdriver.Install,USB\VID_YYYY&PID_XXXX

[testdriver.Install.NT]
CopyFiles=testdriver.Files.Driver.NT
Include=MSPORTS.INF
Needs=SerialEnumerator.NT
AddReg=testdriver.NT.AddReg

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

[DestinationDirs]
CoInstaller_CopyFiles = 11

[testsysF.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”

[testsysF.Dev.NT.Wdf]
KmdfService = testsysF, testsysF_wdfsect
[testsysF_wdfsect]
KmdfLibraryVersion = 1.9

The problem is that you are using the prefix “testsysF.Dev” for the
co-installer section, but your actual device section is
“testdriver.Install”. Device Manager looks for your co-installer
section by appending “.CoInstallers” and “.NT.CoInstallers” to your
master device section name. The names have to match.

Use [testdriver.Install.NT.CoInstallers] and [testdriver.Install.NT.Wdf]
and things should be better.


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