WdfCoInstaller failed. Error 127: The specified procedure could not be found.

Seniors,

I am still new to Windows device driver development, and I can not have my driver load on my target system:

Windows XP Professional Service Pack 2
Kernel version: 5.1.2600.2180
Build Lab : xpsp_sp2_rtm.040803-2158

My driver is built by WDK6000 (KMDF 1.5). As I read the Microsoft document (http://www.microsoft.com/whdc/driver/wdf/KMDF_pkg.mspx), it should work on my target system. But I always get fail message:

Windows cannot load the device driver for this hardware.
The driver may be corrupted or missing. (Code 39)

The last message I got from the setupapi.log is

#E145 Obtaining exported function “WdfCoInstalle” for module “C:\WINDOWS\system32\WdfCoInstaller01005.dll” failed. Error 127: The specified procedure could not be found.

The target is a free build system, the WdfCoInstaller is for free build. I have no idea how can I do now. Please help!

Thank you very much!

I purged the setupapi.log, got the logged message about my driver loading. Sorry I do not sure which line is important or not, so I post it all here for your reference:

---- start of log ----
[SetupAPI Log]
OS Version = 5.1.2600 Service Pack 2
Platform ID = 2 (NT)
Service Pack = 2.0
Suite = 0x0100
Product Type = 1
Architecture = x86
[2007/12/22 13:56:21 1196.52]
#-198 Command line processed: “C:\WINDOWS\system32\mmc.exe” C:\WINDOWS\system32\devmgmt.msc /s
#-148 Loading coinstaller modules for “Aga Instrument simple I/O card”.
#E360 An unsigned or incorrectly signed file “C:\WINDOWS\system32\WdfCoInstaller01005.dll” for driver “Aga Instrument simple I/O card” will be installed (Policy=Ignore). Error 2: The system cannot find the file specified.
#E144 Loading module “C:\WINDOWS\system32\WdfCoInstaller01005.dll” failed. Error 126: The specified module could not be found.
#-166 Device install function: DIF_REMOVE.
#I289 Removing device “PCI\VEN_E159&DEV_0001&SUBSYS_00010001&REV_00\4&CF81C54&0&00F0”.
#I048 Device removed.
[2007/12/22 13:57:35 684.3 Driver Install]
#-019 Searching for hardware ID(s): pci\ven_e159&dev_0001&subsys_00010001&rev_00,pci\ven_e159&dev_0001&subsys_00010001,pci\ven_e159&dev_0001&cc_028000,pci\ven_e159&dev_0001&cc_0280
#-018 Searching for compatible ID(s): pci\ven_e159&dev_0001&rev_00,pci\ven_e159&dev_0001,pci\ven_e159&cc_028000,pci\ven_e159&cc_0280,pci\ven_e159,pci\cc_028000,pci\cc_0280
#-198 Command line processed: C:\WINDOWS\system32\services.exe
#-166 Device install function: DIF_SELECTBESTCOMPATDRV.
#W059 Selecting best compatible driver failed. Error 0xe0000228: There are no compatible drivers for this device.
#W157 Default installer failed. Error 0xe0000228: There are no compatible drivers for this device.
[2007/12/22 13:57:37 1348.2]
#-199 Executing “C:\WINDOWS\system32\rundll32.exe” with command line: rundll32.exe newdev.dll,ClientSideInstall \.\pipe\PNP_Device_Install_Pipe_0.{D894A488-F734-49D6-967D-E9B893FA8AB3}
#I060 Set selected driver.
#-019 Searching for hardware ID(s): pci\ven_e159&dev_0001&subsys_00010001&rev_00,pci\ven_e159&dev_0001&subsys_00010001,pci\ven_e159&dev_0001&cc_028000,pci\ven_e159&dev_0001&cc_0280
#-018 Searching for compatible ID(s): pci\ven_e159&dev_0001&rev_00,pci\ven_e159&dev_0001,pci\ven_e159&cc_028000,pci\ven_e159&cc_0280,pci\ven_e159,pci\cc_028000,pci\cc_0280
#-166 Device install function: DIF_SELECTBESTCOMPATDRV.
#W059 Selecting best compatible driver failed. Error 0xe0000228: There are no compatible drivers for this device.
#W157 Default installer failed. Error 0xe0000228: There are no compatible drivers for this device.
#I060 Set selected driver.
#-019 Searching for hardware ID(s): pci\ven_e159&dev_0001&subsys_00010001&rev_00,pci\ven_e159&dev_0001&subsys_00010001,pci\ven_e159&dev_0001&cc_028000,pci\ven_e159&dev_0001&cc_0280
#-018 Searching for compatible ID(s): pci\ven_e159&dev_0001&rev_00,pci\ven_e159&dev_0001,pci\ven_e159&cc_028000,pci\ven_e159&cc_0280,pci\ven_e159,pci\cc_028000,pci\cc_0280
#-019 Searching for hardware ID(s): pci\ven_e159&dev_0001&subsys_00010001&rev_00,pci\ven_e159&dev_0001&subsys_00010001,pci\ven_e159&dev_0001&cc_028000,pci\ven_e159&dev_0001&cc_0280
#-018 Searching for compatible ID(s): pci\ven_e159&dev_0001&rev_00,pci\ven_e159&dev_0001,pci\ven_e159&cc_028000,pci\ven_e159&cc_0280,pci\ven_e159,pci\cc_028000,pci\cc_0280
#I022 Found “PCI\VEN_e159&DEV_0001” in c:\documents and settings\reed\desktop\aiio_fre\aiio.inf; Device: “Aga Instrument simple I/O card”; Driver: “Aga Instrument simple I/O card”; Provider: “Aga Instrument”; Mfg: “Aga Instrument”; Section name: “Aiio_Inst”.
#I087 Driver node not trusted, rank changed from 0x00002001 to 0x0000a001.
#I023 Actual install section: [Aiio_Inst.NT]. Rank: 0x0000a001. Effective driver date: 12/18/2007.
#-166 Device install function: DIF_SELECTBESTCOMPATDRV.
#I063 Selected driver installs from section [Aiio_Inst] in “c:\documents and settings\reed\desktop\aiio_fre\aiio.inf”.
#I320 Class GUID of device remains: {625772C1-5EC4-4447-AA01-42B65B49ACFF}.
#I060 Set selected driver.
#I058 Selected best compatible driver.
#-124 Doing copy-only install of “PCI\VEN_E159&DEV_0001&SUBSYS_00010001&REV_00\4&CF81C54&0&00F0”.
#E360 An unsigned or incorrectly signed file “c:\documents and settings\reed\desktop\aiio_fre\aiio.inf” for driver “Aga Instrument simple I/O card” will be installed (Policy=Ignore). Error 0xe000022f: The third-party INF does not contain digital signature information.
#W187 Install failed, attempting to restore original files.
#E360 An unsigned or incorrectly signed file “c:\documents and settings\reed\desktop\aiio_fre\aiio.inf” for driver “Aga Instrument simple I/O card” will be installed (Policy=Ignore). Error 0xe000022f: The third-party INF does not contain digital signature information.
#-024 Copying file “c:\documents and settings\reed\desktop\aiio_fre\aiio.sys” to “C:\WINDOWS\system32\DRIVERS\aiio.sys”.
#E360 An unsigned or incorrectly signed file “c:\documents and settings\reed\desktop\aiio_fre\aiio.inf” for driver “Aga Instrument simple I/O card” will be installed (Policy=Ignore). Error 0xe000022f: The third-party INF does not contain digital signature information.
#-336 Copying file “c:\documents and settings\reed\desktop\aiio_fre\WdfCoInstaller01005.dll” to “C:\WINDOWS\system32\WdfCoInstaller01005.dll” via temporary file “C:\WINDOWS\system32\SET4.tmp”.
#E360 An unsigned or incorrectly signed file “c:\documents and settings\reed\desktop\aiio_fre\WdfCoInstaller01005.dll” for driver “Aga Instrument simple I/O card” will be installed (Policy=Ignore). Error 0xe000022f: The third-party INF does not contain digital signature information.
#-166 Device install function: DIF_REGISTER_COINSTALLERS.
#I056 Coinstallers registered.
#-148 Loading coinstaller modules for “Aga Instrument simple I/O card”.
#E145 Obtaining exported function “WdfCoInstalle” for module “C:\WINDOWS\system32\WdfCoInstaller01005.dll” failed. Error 127: The specified procedure could not be found.
#-166 Device install function: DIF_INSTALLINTERFACES.
#-011 Installing section [Aiio_Inst.NT.Interfaces] from “c:\documents and settings\reed\desktop\aiio_fre\aiio.inf”.
#I054 Interfaces installed.
#-166 Device install function: DIF_INSTALLDEVICE.
#I123 Doing full install of “PCI\VEN_E159&DEV_0001&SUBSYS_00010001&REV_00\4&CF81C54&0&00F0”.
#E360 An unsigned or incorrectly signed file “c:\documents and settings\reed\desktop\aiio_fre\aiio.inf” for driver “Aga Instrument simple I/O card” will be installed (Policy=Ignore). Error 0xe000022f: The third-party INF does not contain digital signature information.
#I163 Device not started: Device has problem: 0x27: CM_PROB_DRIVER_FAILED_LOAD.
#I121 Device install of “PCI\VEN_E159&DEV_0001&SUBSYS_00010001&REV_00\4&CF81C54&0&00F0” finished successfully.
[2007/12/22 13:59:47 1144.2]
#-198 Command line processed: “C:\WINDOWS\system32\RUNDLL32.EXE” devmgr.dll,DeviceProblenWizard_RunDLL /deviceid PCI\VEN_E159&DEV_0001&SUBSYS_00010001&REV_00\4&CF81C54&0&00F0
#-148 Loading coinstaller modules for “Aga Instrument simple I/O card”.
#E145 Obtaining exported function “WdfCoInstalle” for module “C:\WINDOWS\system32\WdfCoInstaller01005.dll” failed. Error 127: The specified procedure could not be found.
---- end of log ----

And this is the INF file:

---- start ----
[Version]
Signature=“$WINDOWS NT$”
Class=Aiio
ClassGuid={625772C1-5EC4-4447-AA01-42B65B49ACFF}
Provider=%AI%
DriverVer=12/18/2007,1.0.0.28
CatalogFile=KmdfAiio.cat

[DestinationDirs]
DefaultDestDir = 12

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

[ClassInstall32]
Addreg=AiioClassReg

[AiioClassReg]
HKR,0,%ClassName%
HKR,Icon,-5
HKR,DeviceCharacteristics,0x10001,0x100 ;Use same security checks on relative opens
HKR,Security,“D:P(A;;GA;;;SY)(A;;GA;;;BA)” ;Allow generic all access to system and built-in Admin.
;This one overrides the security set by the driver

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

[ControlFlags]
ExecludeFromSelect=*

[Manufacturer]
%AI%=AI,NTx86

[SourceDisksFiles]
aiio.sys = 1

[SourceDisksNames]
1 = %DISK_NAME%,

; For Win2K
[AI]
; DisplayName Section DeviceId
; ----------- ------- --------
%Aiio.DrvDesc% = Aiio_Inst, PCI\VEN_e159&DEV_0001

; For XP and later
[AI.NTx86]
; DisplayName Section DeviceId
; ----------- ------- --------
%Aiio.DrvDesc% = Aiio_Inst, PCI\VEN_e159&DEV_0001

[Aiio_Inst.NT]
Copyfiles=Aiio.CopyFiles

[Aiio.CopyFiles]
aiio.sys

[Aiio_Inst.NT.Services]
AddService=Aiio, 0x00000002,Aiio_Service

[Aiio_Service]
DisplayName = %Aiio.SvcDesc%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 3 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %12%\aiio.sys

; ------------------ Coinstaller installation
[DestinationDirs]
CoInstaller_CopyFiles = 11

[Aiio_Inst.NT.CoInstallers]
AddReg=CoInstaller_AddReg
CopyFiles=CoInstaller_CopyFiles

[CoInstaller_CopyFiles]
WdfCoInstaller01005.dll

[SourceDiskFiles]
WdfCoInstaller01005.dll = 1 ; make sure the number matches with SourceDisksNames

[CoInstaller_AddReg]
HKR,CoInstallers32,0x00010000, “WdfCoInstaller01005.dll,WdfCoInstalle”

[Aiio_Inst.NT.Wdf]
KmdfService = Aiio, Aiio_wdfsect

[Aiio_wdfsect]
KmdfLibraryVersion = 1.5

[Strings]
AI = “Aga Instrument”
ClassName = “Aga Instrument I/O”
Aiio.SvcDesc = “Service for the Aga Instrument simple I/O card”
Aiio.DrvDesc = “Aga Instrument simple I/O card”
DISK_NAME = “Aiio Install Disk”
---- end ----

Dear Reed,

I am also new to Windows Drivers but just attempting to understand the problem.

Please kindly refer to the following segment of the INF file:

[CoInstaller_AddReg]

HKR,CoInstallers32,0x00010000, “WdfCoInstaller01005.dll,WdfCoInstalle”

I guess this should be:

[CoInstaller_AddReg]

HKR,CoInstallers32,0x00010000, “WdfCoInstaller01005.dll,WdfCoInstaller”

That is the letter ‘r’ is missing. This may be the reason why the system is searching for the exported procedure “WdfCoInstalle” instead of “WdfCoInstaller”.

Regards.

Uday,

It works and I much understand the messages now.

Thank you very much!