none
Why Kernel driver starts twice? RRS feed

  • Question

  • Hello,

    We have our hardware and written for this hardware Kernel mode driver. It works well. The problem is, that when registry key «HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services\DriverName\Start» is set to 0, we get our driver started twice. In case, when we set 4 to this registry key, driver works perfect.

    The point is, that under Windows XP we used this registry key to start our Kernel driver automatically with starting up of Windows XP, when it was set to 0.

    Now under Windows 7 32-bit under the same conditions our driver starts twice.

    Why our driver starts twice? Is it possible to get rid of such behaviour and make so, that when we will set Start registry key to 0, driver will start only 1 time? Or something was changed from times of Windows XP?

    P.s. In case of double start of the driver we get next error in device manager on our driver: "Windows cannot load the device driver for this
    hardware because a previous instance of the device driver is still in memory.
    (Code 38)
    ". When we set Start key to 4, the error disappears.

    --

    Kind regards,

    Alexey Kisliy




    • Edited by Oleksii Kyslyi Wednesday, August 14, 2013 1:30 PM Added one point
    Wednesday, August 14, 2013 10:58 AM

All replies

  • Hi,

    As written in MSDN for value 0

    0x0            Kernel     Represents a part of the
    (Boot)                    driver stack for the boot
                              (startup) volume and must
                              therefore be loaded by the
                              Boot Loader.

    This means that before regular driver load the boot loader calls DriverEntry to check if device in paging path. I assume your error is due to incorrect handling of the first call of your driver or incorrect propeties/capabilites the driver reports to the OS.

    Thanks,

    Alon

    Wednesday, August 14, 2013 2:22 PM
  • Not sure why the double call is happening, or perhaps why you belive it is happening.  I've written a lot of boot drivers over the years, and the do get loaded by the boot loader but are not loaded or called twice.  The logic of the previous post is wrong.

    Can you please explain why you believe the driver starts twice?  Do you have a debug print statement in DriverEntry that is showing up twice?   Without knowing why you believe there is a problem, we probably can't solve this.


    Don Burn Windows Filesystem and Driver Consulting Website: http://www.windrvr.com Blog: http://msmvps.com/blogs/WinDrvr

    Wednesday, August 14, 2013 2:29 PM
  • I have debugged DriverEntry function. Under debug it executes 1 time.

    I believe, that driver starts 2 times, because in properties of the driver in device manager get this error: "Windows cannot load the device driver for this
    hardware because a previous instance of the device driver is still in memory.
    (Code 38)
    ".

    Also, when I set Start registry key for the driver to 4, what means do not start, - drivers starts well without errors. It means, that our driver starts 2 times.

    So is my logic.

    --

    Kind regards,

    Alexey Kisliy

    Wednesday, August 14, 2013 2:32 PM
  • But anyway driver with error 38 or without it works proper. It is question just about yellow exclamation mark in case of error with code 38, when Start key is 0.

    --

    Kind regards,

    Alexey Kisliy


    • Edited by Oleksii Kyslyi Wednesday, August 14, 2013 2:40 PM Added one point
    Wednesday, August 14, 2013 2:33 PM
  • Then turn on SetupAPI logging http://msdn.microsoft.com/en-us/library/windows/hardware/ff550887(v=vs.85).aspx and see what the system is doing.  There is something weird going on here without the log, you won't find it.


    Don Burn Windows Filesystem and Driver Consulting Website: http://www.windrvr.com Blog: http://msmvps.com/blogs/WinDrvr

    Wednesday, August 14, 2013 2:44 PM
  • Part 2:

    >>>  [Device Install (DiShowUpdateDevice) - PCI\VEN_5041&DEV_5330&SUBSYS_00000000&REV_22\4&2B16CBEC&0&08F0]
    >>>  Section start 2013/08/14 16:57:35.394
          cmd: "C:\Windows\system32\mmc.exe" "C:\Windows\system32\compmgmt.msc" /s
         dvi: {DIF_UPDATEDRIVER_UI} 16:57:35.394
         dvi:      No class installer for 'Fibre Channel-Controller'
         dvi:      No CoInstallers found
         dvi:      Default installer: Enter 16:57:35.394
         dvi:      Default installer: Exit
         dvi: {DIF_UPDATEDRIVER_UI - exit(0xe000020e)} 16:57:35.394
         ndv: {Update Driver Software Wizard for PCI\VEN_5041&DEV_5330&SUBSYS_00000000&REV_22\4&2B16CBEC&0&08F0}
         dvi:      Set selected driver complete.
         dvi:      {DIF_SELECTDEVICE} 16:57:36.470
         dvi:           No class installer for 'Fibre Channel-Controller'
         dvi:      {DIF_SELECTDEVICE - exit(0xe000020e)} 16:57:36.470
         ui :      Prompting user for disk...
         ui :      DPROMPT result = 0
         dvi:      {DIF_SELECTDEVICE} 16:57:43.393
         dvi:           No class installer for 'Fibre Channel-Controller'
         dvi:      {DIF_SELECTDEVICE - exit(0xe000020e)} 16:57:43.393
         inf:      {SetupCopyOEMInf: C:\Windows\INF\oem6.inf} 16:57:44.391
         inf:           Driver Store location: C:\Windows\System32\DriverStore\FileRepository\cncdevice.inf_x86_neutral_7c215023ff8a7a53\NameOfInfFile.inf
         inf:           Published Inf Path: C:\Windows\INF\oem6.inf
         inf:           Opened PNF: 'C:\Windows\INF\oem6.inf' ([strings])
         inf:           OEM source media location: C:\Windows\INF\
         inf:      {SetupCopyOEMInf exit (0x00000000)} 16:57:44.500
         dvi:      Searching for hardware ID(s):
         dvi:           pci\ven_5041&dev_5330&subsys_00000000&rev_22
         dvi:           pci\ven_5041&dev_5330&subsys_00000000
         dvi:           pci\ven_5041&dev_5330&rev_22
         dvi:           pci\ven_5041&dev_5330
         dvi:           pci\ven_5041&dev_5330&cc_0c0453
         dvi:           pci\ven_5041&dev_5330&cc_0c04
         dvi:      Searching for compatible ID(s):
         dvi:           pci\ven_5041&cc_0c0453
         dvi:           pci\ven_5041&cc_0c04
         dvi:           pci\ven_5041
         dvi:           pci\cc_0c0453
         dvi:           pci\cc_0c04
         inf:      Opened PNF: 'C:\Windows\System32\DriverStore\FileRepository\cncdevice.inf_x86_neutral_7c215023ff8a7a53\NameOfInfFile.inf' ([strings])
         sig:      {_VERIFY_FILE_SIGNATURE} 16:57:44.500
         sig:           Key      = NameOfInfFile.inf
         sig:           FilePath = C:\Windows\System32\DriverStore\FileRepository\cncdevice.inf_x86_neutral_7c215023ff8a7a53\NameOFInfFile.inf
    !    sig:           No installed catalogs matching catalog name '' were found that validated the file.
         sig:      {_VERIFY_FILE_SIGNATURE exit(0x00000490)} 16:57:44.500
         dvi:      Selected driver installs from section [PCISercos] in 'c:\windows\system32\driverstore\filerepository\NameOfInfFile.inf_x86_neutral_7c215023ff8a7a53\NameOfInfFile.inf'.
         dvi:      Class GUID of device remains: {5216236a-5dbe-48ba-a7bd-8444d7641005}.
         dvi:      Set selected driver complete.
         dvi:      {Plug and Play Service: Device Install for PCI\VEN_5041&DEV_5330&SUBSYS_00000000&REV_22\4&2B16CBEC&0&08F0}
         ump:           Creating Install Process: DrvInst.exe 16:57:44.500
         ndv:           Infpath=C:\Windows\INF\oem6.inf
         ndv:           DriverNodeName=cncdevice.inf:IBH.Mfg:PCISercos:2.0.9.2:pci\ven_5041&dev_5330&subsys_00000000
         ndv:           DriverStorepath=C:\Windows\System32\DriverStore\FileRepository\cncdevice.inf_x86_neutral_7c215023ff8a7a53\NameOfInfFile.inf
         ndv:           Building driver list from driver node strong name...
         dvi:           Searching for hardware ID(s):
         dvi:                pci\ven_5041&dev_5330&subsys_00000000&rev_22
         dvi:                pci\ven_5041&dev_5330&subsys_00000000
         dvi:                pci\ven_5041&dev_5330&rev_22
         dvi:                pci\ven_5041&dev_5330
         dvi:                pci\ven_5041&dev_5330&cc_0c0453
         dvi:                pci\ven_5041&dev_5330&cc_0c04
         dvi:           Searching for compatible ID(s):
         dvi:                pci\ven_5041&cc_0c0453
         dvi:                pci\ven_5041&cc_0c04
         dvi:                pci\ven_5041
         dvi:                pci\cc_0c0453
         dvi:                pci\cc_0c04
         inf:           Opened PNF: 'C:\Windows\System32\DriverStore\FileRepository\cncdevice.inf_x86_neutral_7c215023ff8a7a53\NameOfInfFile.inf' ([strings])
         sig:           {_VERIFY_FILE_SIGNATURE} 16:57:44.859
         sig:                Key      = cncdevice.inf
         sig:                FilePath = C:\Windows\System32\DriverStore\FileRepository\cncdevice.inf_x86_neutral_7c215023ff8a7a53\NameOfInfFile.inf
    !    sig:                No installed catalogs matching catalog name '' were found that validated the file.
         sig:           {_VERIFY_FILE_SIGNATURE exit(0x00000490)} 16:57:44.875
         dvi:           Selected driver installs from section [PCISercos] in 'c:\windows\system32\driverstore\filerepository\NameOfInfFile.inf_x86_neutral_7c215023ff8a7a53\NameOfInfFile.inf'.
         dvi:           Class GUID of device remains: {5216236a-5dbe-48ba-a7bd-8444d7641005}.
         dvi:           Set selected driver complete.
         ndv:           {Core Device Install} 16:57:44.875
         inf:                Opened PNF: 'C:\Windows\INF\oem6.inf' ([strings])
         dvi:                {DIF_ALLOW_INSTALL} 16:57:44.890
         dvi:                     No class installer for DriverName'
         dvi:                     No CoInstallers found
         dvi:                     Default installer: Enter 16:57:44.890
         dvi:                     Default installer: Exit
         dvi:                {DIF_ALLOW_INSTALL - exit(0xe000020e)} 16:57:44.890
         ndv:                Installing files...
         dvi:                {DIF_INSTALLDEVICEFILES} 16:57:44.890
         dvi:                     No class installer for 'DriverName'
         dvi:                     Default installer: Enter 16:57:44.890
         dvi:                          {Install FILES}
         inf:                               Opened PNF: 'c:\windows\system32\driverstore\filerepository\cncdevice.inf_x86_neutral_7c215023ff8a7a53\NameOfInfFile.inf' ([strings])
         inf:                               {Install Inf Section [DriverName]}
         inf:                               {Install Inf Section [DriverName] exit (0x00000000)}
         dvi:                               Processing co-installer registration section [DriverName.CoInstallers].
         inf:                               {Install Inf Section [DriverName.CoInstallers]}
         inf:                               {Install Inf Section [DriverName.CoInstallers] exit (0x00000000)}
         dvi:                               Co-installers registered.
         dvi:                               {Install INTERFACES}
         dvi:                                    Installing section [DriverName.Interfaces]
         dvi:                               {Install INTERFACES exit 00000000}
         dvi:                          {Install FILES exit (0x00000000)}
         dvi:                     Default installer: Exit
         dvi:                {DIF_INSTALLDEVICEFILES - exit(0x00000000)} 16:57:44.890
         ndv:                Pruning file queue...
         dvi:                {_SCAN_FILE_QUEUE}
         flq:                     ScanQ flags=620
         flq:                          SPQ_SCAN_PRUNE_COPY_QUEUE
         flq:                          SPQ_SCAN_FILE_COMPARISON
         flq:                          SPQ_SCAN_ACTIVATE_DRP
         flq:                     ScanQ number of copy nodes=0
         flq:                     ScanQ action=200 DoPruning=32
         flq:                     ScanQ end Validity flags=620 CopyNodes=0
         dvi:                {_SCAN_FILE_QUEUE exit(0, 0x00000000)}
         ndv:                Committing file queue...
         flq:                {_commit_file_queue}
         flq:                     CommitQ DelNodes=0 RenNodes=0 CopyNodes=0
         flq:                     CommitQ early exit: No nodes are queued
         flq:                {_commit_file_queue exit OK}
         ndv:                Registering CoInstallers...
         dvi:                {DIF_REGISTER_COINSTALLERS} 16:57:44.890
         dvi:                     No class installer for 'DriverName'
         dvi:                     Default installer: Enter 16:57:44.906
         inf:                          Opened PNF: 'c:\windows\system32\driverstore\filerepository\NameOfInfFile.inf_x86_neutral_7c215023ff8a7a53\NameOfInfFile.inf' ([strings])
         inf:                          {Install Inf Section [DriverName.CoInstallers]}
         inf:                          {Install Inf Section [DriverName.CoInstallers] exit (0x00000000)}
         dvi:                          Co-installers registered.
         dvi:                     Default installer: Exit
         dvi:                {DIF_REGISTER_COINSTALLERS - exit(0x00000000)} 16:57:44.906
         ndv:                Installing interfaces...
         dvi:                {DIF_INSTALLINTERFACES} 16:57:44.906
         dvi:                     No class installer for 'DriverName'
         dvi:                     No CoInstallers found
         dvi:                     Default installer: Enter 16:57:44.906
         dvi:                          {Install INTERFACES}
         inf:                               Opened PNF: 'c:\windows\system32\driverstore\filerepository\NAmeOfInfFile.inf_x86_neutral_7c215023ff8a7a53\NameOfInfFile.inf' ([strings])
         dvi:                               Installing section [DriverName.Interfaces]
         dvi:                          {Install INTERFACES exit 00000000}
         dvi:                     Default installer: Exit
         dvi:                {DIF_INSTALLINTERFACES - exit(0x00000000)} 16:57:44.906
         ndv:                Installing device...
         dvi:                {DIF_INSTALLDEVICE} 16:57:44.906
         dvi:                     No class installer for 'DriverName'
         dvi:                     Default installer: Enter 16:57:44.906
         dvi:                          {Install DEVICE}
         inf:                               Opened PNF: 'c:\windows\system32\driverstore\filerepository\NameOfInfFile.inf_x86_neutral_7c215023ff8a7a53\NameOfInfFile.inf' ([strings])
         dvi:                               Processing Registry/Property directives...
         inf:                               {Install Inf Section [DriverName]}
         inf:                               {Install Inf Section [DriverName] exit (0x00000000)}
         inf:                               {Install Inf Section [DriverName.Hw]}
         inf:                                    Empty section
         inf:                               {Install Inf Section [DriverName.Hw] exit (0x00000000)}
         dvi:                               {Writing Device Properties}
         dvi:                                    Provider name=ManufacturerName
         dvi:                                    DriverVersion=2.0.9.2
         dvi:                                    Class name=Device Interface
         dvi:                                    Manufacturer=ManufacturerName
         dvi:                                    Matching DeviceID=pci\ven_5041&dev_5330&subsys_00000000
         dvi:                                    Strong Name=oem6.inf:IBH.Mfg:DriverName:2.0.9.2:pci\ven_5041&dev_5330&subsys_00000000
         dvi:                               {Writing Device Properties - Complete}
         inf:                               {Install Inf Section [DriverName.Services]}
         inf:                                    AddService=DriverName,0x00000002,PCISercos_Service_Inst,DriverName_EventLog_Inst  (NameOfInfFile.inf line 53)
         inf:                                    ServiceType=1  (NameOfInfFile.inf line 56)
         inf:                                    StartType=3  (NameOfInfFile.inf line 57)
         inf:                                    ErrorControl=1  (NameOfInfFile.inf line 58)
         inf:                                    ServiceBinary=C:\Windows\system32\DRIVERS\DriverName.sys  (NameOfInfFile.inf line 60)
         inf:                                    LoadOrderGroup="Extended Base"  (cncdevice.inf line 59)
         dvi:                                    Add Service: Modified existing service DriverName.
         inf:                               {Install Inf Section [DriverName.Services] exit(0x00000000)}
         dvi:                               Updated reflected section names for: oem6.inf
         dvi:                          {Install DEVICE exit (0x00000000)}
         dvi:                          Writing common driver property settings.
         dvi:                               DriverDescription=DriverName
         dvi:                               DeviceDisplayName=DriverName
         dvi:                          Install Device: Restarting device. 16:57:50.522
         dvi:                          Install Device: Restarting device completed. 16:58:06.481
         dvi:                     Default installer: Exit
         dvi:                {DIF_INSTALLDEVICE - exit(0x00000000)} 16:58:06.481
         dvi:                {DIF_NEWDEVICEWIZARD_FINISHINSTALL} 16:58:06.481
         dvi:                     No class installer for 'DriverName'
         dvi:                     Default installer: Enter 16:58:06.481
         dvi:                     Default installer: Exit
         dvi:                {DIF_NEWDEVICEWIZARD_FINISHINSTALL - exit(0xe000020e)} 16:58:06.481
         ndv:                Device install status=0x00000000
         ndv:                Performing device install final cleanup...
         ndv:           {Core Device Install - exit(0x00000000)} 16:58:06.481
         ump:           Server install process exited with code 0x00000000 16:58:06.481
         ump:      {Plug and Play Service: Device Install exit(00000000)}
         dvi:      {DIF_NEWDEVICEWIZARD_FINISHINSTALL} 16:58:06.496
         dvi:           No class installer for 'DriverName'
         dvi:           No CoInstallers found
         dvi:           Default installer: Enter 16:58:06.496
         dvi:           Default installer: Exit
         dvi:      {DIF_NEWDEVICEWIZARD_FINISHINSTALL - exit(0xe000020e)} 16:58:06.496
         ndv: {Update Driver Software Wizard exit(00000000)}
    <<<  Section end 2013/08/14 16:58:34.124
    <<<  [Exit status: SUCCESS]

    --

    Kind regards,

    Alexey Kisliy


    • Edited by Oleksii Kyslyi Wednesday, August 14, 2013 3:33 PM Added one point
    Wednesday, August 14, 2013 3:26 PM
  • So, my setupapi.dev.log is listed below. This log is creted by last driver installation.

    Could you be so kind to tell, whether there are some errors in this log? And what can I do with them?

    Part 1:

    [Device Install Log]
         OS Version = 6.1.7600
         Service Pack = 0.0
         Suite = 0x0100
         ProductType = 1
         Architecture = x86

    [BeginLog]

    [Boot Session: 2013/08/14 16:50:22.359]

    >>>  [Device Uninstall (Device Manager) - PCI\VEN_5041&DEV_5330&SUBSYS_00000000&REV_22\4&2B16CBEC&0&08F0]
    >>>   Section start 2013/08/14 16:54:07.776
          cmd: "C:\Windows\system32\mmc.exe" "C:\Windows\system32\compmgmt.msc" /s
         dvi: {DIF_REMOVE} 16:54:07.776
         dvi:      No class installer for 'PCISercos'
         dvi:      No CoInstallers found
         dvi:      Default installer: Enter 16:54:07.776
         dvi:           {Remove DEVICE}
         dvi:                InstanceID = 'PCI\VEN_5041&DEV_5330&SUBSYS_00000000&REV_22\4&2B16CBEC&0&08F0'
         dvi:                Devnode Status = 0x01802400
         dvi:                CM_Query_And_Remove_Subtree_Ex returns 0x00000000
         dvi:                Devnode Status after CM_Query_And_Remove_Subtree_Ex = 0x01802400
         dvi:                Query-and-Remove succeeded
         dvi:                {Delete DEVICE}
         dvi:                     Device Instance uninstalled.
         dvi:                {Delete DEVICE exit (0x00000000)}
         dvi:           {Remove DEVICE exit (0x00000000)}
         dvi:      Default installer: Exit
         dvi: {DIF_REMOVE - exit(0x00000000)} 16:54:07.792
    <<<   Section end 2013/08/14 16:54:07.792
    <<<   [Exit status: SUCCESS]


    [Boot Session: 2013/08/14 16:55:39.359]

    >>>  [Device Install (Hardware initiated) - pci\ven_5041&dev_5330&subsys_00000000&rev_22\4&2b16cbec&0&08f0]
    >>>   Section start 2013/08/14 16:56:13.241
         ump: Creating Install Process: DrvInst.exe 16:56:13.241
         ndv: Retrieving device info...
         ndv: Setting device parameters...
         ndv: Searching Driver Store and Device Path...
         dvi: {Build Driver List} 16:56:14.395
         dvi:      Searching for hardware ID(s):
         dvi:           pci\ven_5041&dev_5330&subsys_00000000&rev_22
         dvi:           pci\ven_5041&dev_5330&subsys_00000000
         dvi:           pci\ven_5041&dev_5330&rev_22
         dvi:           pci\ven_5041&dev_5330
         dvi:           pci\ven_5041&dev_5330&cc_0c0453
         dvi:           pci\ven_5041&dev_5330&cc_0c04
         dvi:      Searching for compatible ID(s):
         dvi:           pci\ven_5041&cc_0c0453
         dvi:           pci\ven_5041&cc_0c04
         dvi:           pci\ven_5041
         dvi:           pci\cc_0c0453
         dvi:           pci\cc_0c04
         cpy:      Policy is set to make all digital signatures equal.
         dvi:      Enumerating INFs from path list 'C:\Windows\INF'
         inf:      Opened PNF: 'C:\Windows\System32\DriverStore\FileRepository\cncdevice.inf_x86_neutral_7c215023ff8a7a53\cncdevice.inf' ([strings])
         sig:      {_VERIFY_FILE_SIGNATURE} 16:56:14.754
         sig:           Key      = cncdevice.inf
         sig:           FilePath = C:\Windows\System32\DriverStore\FileRepository\cncdevice.inf_x86_neutral_7c215023ff8a7a53\cncdevice.inf
    !    sig:           No installed catalogs matching catalog name '' were found that validated the file.
         sig:      {_VERIFY_FILE_SIGNATURE exit(0x00000490)} 16:56:16.642
         dvi:      Created Driver Node:
         dvi:           HardwareID   - PCI\VEN_5041&DEV_5330&SUBSYS_00000000
         dvi:           InfName      - C:\Windows\System32\DriverStore\FileRepository\NameOfInfFile.inf_x86_neutral_7c215023ff8a7a53\cncdevice.inf
         dvi:           DevDesc      - DriverName
         dvi:           DrvDesc      - DriverName
         dvi:           Provider     - ManufacturerName
         dvi:           Mfg          - ManufacturerName
         dvi:           ModelsSec    - ManufacturerName.Mfg
         dvi:           InstallSec   - DriverName
         dvi:           ActualSec    - DriverName
         dvi:           Rank         - 0xc0ff0001
         dvi:           Signer       - Nicht digital signiert
         dvi:           Signer Score - Not digitally signed
         dvi:           DrvDate      - 01/01/1601
         dvi:           Version      - 2.0.9.2
         inf:      Searched 1 potential matches in published INF directory
         sig:      {_VERIFY_FILE_SIGNATURE} 16:56:16.720
         sig:           Key      = NameOfInfFile.inf
         sig:           FilePath = C:\Windows\INF\NameOfInfFile.inf
    !    sig:           No installed catalogs matching catalog name '' were found that validated the file.
         sig:      {_VERIFY_FILE_SIGNATURE exit(0x00000490)} 16:56:16.720
         dvi:      Created Driver Node:
         dvi:           HardwareID   - PCI\VEN_5041&DEV_5330&SUBSYS_00000000
         dvi:           InfName      - C:\Windows\INF\NameOfInfFile.inf
         dvi:           DevDesc      - DriverName
         dvi:           DrvDesc      - DriverName
         dvi:           Provider     - ManufacturerName
         dvi:           Mfg          - ManufacturerName
         dvi:           ModelsSec    - ManufacturerName.Mfg
         dvi:           InstallSec   - DriverName
         dvi:           ActualSec    - DriverNAme
         dvi:           Rank         - 0xc0ff0001
         dvi:           Signer       - Nicht digital signiert
         dvi:           Signer Score - Not digitally signed
         dvi:           DrvDate      - 01/01/1601
         dvi:           Version      - 2.0.9.2
         inf:      Searched 38 INFs in directory: 'C:\Windows\INF'
         inf:      Searched 1 INFs in directory: 'C:\Program Files\Belkin\F7D2101\v1\Win7x86'
         dvi: {Build Driver List - exit(0x00000000)} 16:56:16.829
         ndv: Selecting best match from Driver Store (including Device Path)...
         dvi: {DIF_SELECTBESTCOMPATDRV} 16:56:16.829
         dvi:      No class installer for 'Fibre Channel Controller'
         dvi:      No CoInstallers found
         dvi:      Default installer: Enter 16:56:16.829
         dvi:           {Select Best Driver}
         dvi:                Selected driver installs from section [PCISercos] in 'c:\windows\system32\driverstore\filerepository\NameOfInfFile.inf_x86_neutral_7c215023ff8a7a53\cncdevice.inf'.
         dvi:                Class GUID of device changed to: {5216236a-5dbe-48ba-a7bd-8444d7641005}.
         dvi:                Set selected driver complete.
         dvi:                Selected:
         dvi:                     Description - [DriverName]
         dvi:                     InfFile     - [c:\windows\system32\driverstore\filerepository\NameOfInfFile.inf_x86_neutral_7c215023ff8a7a53\cncdevice.inf]
         dvi:                     Section     - [DriverName]
         dvi:                     Signer      - [Nicht digital signiert]
         dvi:                     Rank        - [0xc0ff0001]
         dvi:           {Select Best Driver - exit(0x00000000)}
         dvi:      Default installer: Exit
         dvi: {DIF_SELECTBESTCOMPATDRV - exit(0x00000000)} 16:56:16.829
         inf: {SetupCopyOEMInf: C:\Windows\INF\oem6.inf} 16:56:16.829
         inf:      Driver Store location: C:\Windows\System32\DriverStore\FileRepository\cncdevice.inf_x86_neutral_7c215023ff8a7a53\cncdevice.inf
         inf:      Published Inf Path: C:\Windows\INF\oem6.inf
         inf: {SetupCopyOEMInf exit (0x00000050)} 16:56:16.829
         dvi: Searching for hardware ID(s):
         dvi:      pci\ven_5041&dev_5330&subsys_00000000&rev_22
         dvi:      pci\ven_5041&dev_5330&subsys_00000000
         dvi:      pci\ven_5041&dev_5330&rev_22
         dvi:      pci\ven_5041&dev_5330
         dvi:      pci\ven_5041&dev_5330&cc_0c0453
         dvi:      pci\ven_5041&dev_5330&cc_0c04
         dvi: Searching for compatible ID(s):
         dvi:      pci\ven_5041&cc_0c0453
         dvi:      pci\ven_5041&cc_0c04
         dvi:      pci\ven_5041
         dvi:      pci\cc_0c0453
         dvi:      pci\cc_0c04
         inf: Opened PNF: 'C:\Windows\System32\DriverStore\FileRepository\cncdevice.inf_x86_neutral_7c215023ff8a7a53\NameOfInfFile.inf' ([strings])
         sig: {_VERIFY_FILE_SIGNATURE} 16:56:16.829
         sig:      Key      = NameOfInfFile.inf
         sig:      FilePath = C:\Windows\System32\DriverStore\FileRepository\cncdevice.inf_x86_neutral_7c215023ff8a7a53\NameOfInfFile.inf
    !    sig:      No installed catalogs matching catalog name '' were found that validated the file.
         sig: {_VERIFY_FILE_SIGNATURE exit(0x00000490)} 16:56:16.829
         dvi: Selected driver installs from section [DriverName] in 'c:\windows\system32\driverstore\filerepository\NameOfInfFile.inf_x86_neutral_7c215023ff8a7a53\NameOfInfFile.inf'.
         dvi: Class GUID of device changed to: {5216236a-5dbe-48ba-a7bd-8444d7641005}.
         dvi: Set selected driver complete.
         ndv: Driver selected, now performing install...
         ndv: {Core Device Install} 16:56:16.845
         inf:      Opened PNF: 'C:\Windows\INF\oem6.inf' ([strings])
         inf:      Opened PNF: 'C:\Windows\INF\oem6.inf' ([strings])
         dvi:      {DIF_ALLOW_INSTALL} 16:56:16.876
         dvi:           No class installer for 'DriverName'
         dvi:           No CoInstallers found
         dvi:           Default installer: Enter 16:56:16.876
         dvi:           Default installer: Exit
         dvi:      {DIF_ALLOW_INSTALL - exit(0xe000020e)} 16:56:16.876
         ndv:      Installing files...
         dvi:      {DIF_INSTALLDEVICEFILES} 16:56:16.876
         dvi:           No class installer for 'DriverName'
         dvi:           Default installer: Enter 16:56:16.876
         dvi:                {Install FILES}
         inf:                     Opened PNF: 'c:\windows\system32\driverstore\filerepository\NameOfInfFile.inf_x86_neutral_7c215023ff8a7a53\cncdevice.inf' ([strings])
         inf:                     {Install Inf Section [DriverName]}
         inf:                     {Install Inf Section [DriverName] exit (0x00000000)}
         dvi:                     Processing co-installer registration section [DriverName.CoInstallers].
         inf:                     {Install Inf Section [DriverName.CoInstallers]}
         inf:                     {Install Inf Section [DriverName.CoInstallers] exit (0x00000000)}
         dvi:                     Co-installers registered.
         dvi:                     {Install INTERFACES}
         dvi:                          Installing section [DriverName.Interfaces]
         dvi:                     {Install INTERFACES exit 00000000}
         dvi:                {Install FILES exit (0x00000000)}
         dvi:           Default installer: Exit
         dvi:      {DIF_INSTALLDEVICEFILES - exit(0x00000000)} 16:56:16.876
         ndv:      Pruning file queue...
         dvi:      {_SCAN_FILE_QUEUE}
         flq:           ScanQ flags=620
         flq:                SPQ_SCAN_PRUNE_COPY_QUEUE
         flq:                SPQ_SCAN_FILE_COMPARISON
         flq:                SPQ_SCAN_ACTIVATE_DRP
         flq:           ScanQ number of copy nodes=0
         flq:           ScanQ action=200 DoPruning=32
         flq:           ScanQ end Validity flags=620 CopyNodes=0
         dvi:      {_SCAN_FILE_QUEUE exit(0, 0x00000000)}
         ndv:      Committing file queue...
         flq:      {_commit_file_queue}
         flq:           CommitQ DelNodes=0 RenNodes=0 CopyNodes=0
         flq:           CommitQ early exit: No nodes are queued
         flq:      {_commit_file_queue exit OK}
         ndv:      Registering CoInstallers...
         dvi:      {DIF_REGISTER_COINSTALLERS} 16:56:16.876
         dvi:           No class installer for 'DriverName'
         dvi:           Default installer: Enter 16:56:16.891
         inf:                Opened PNF: 'c:\windows\system32\driverstore\filerepository\cncdevice.inf_x86_neutral_7c215023ff8a7a53\NameOfInfFile.inf' ([strings])
         inf:                {Install Inf Section [DriverName.CoInstallers]}
         inf:                {Install Inf Section [DriverName.CoInstallers] exit (0x00000000)}
         dvi:                Co-installers registered.
         dvi:           Default installer: Exit
         dvi:      {DIF_REGISTER_COINSTALLERS - exit(0x00000000)} 16:56:16.891
         ndv:      Installing interfaces...
         dvi:      {DIF_INSTALLINTERFACES} 16:56:16.891
         dvi:           No class installer for 'DriverName'
         dvi:           No CoInstallers found
         dvi:           Default installer: Enter 16:56:16.891
         dvi:                {Install INTERFACES}
         inf:                     Opened PNF: 'c:\windows\system32\driverstore\filerepository\NameOfInfFile.inf_x86_neutral_7c215023ff8a7a53\NameOfInfFile.inf' ([strings])
         dvi:                     Installing section [DriverName.Interfaces]
         dvi:                {Install INTERFACES exit 00000000}
         dvi:           Default installer: Exit
         dvi:      {DIF_INSTALLINTERFACES - exit(0x00000000)} 16:56:16.891
         ndv:      Installing device...
         dvi:      {DIF_INSTALLDEVICE} 16:56:16.891
         dvi:           No class installer for 'DriverName'
         dvi:           Default installer: Enter 16:56:16.891
         dvi:                {Install DEVICE}
         inf:                     Opened PNF: 'c:\windows\system32\driverstore\filerepository\NameOfInfFile.inf_x86_neutral_7c215023ff8a7a53\NameOfInfFile.inf' ([strings])
         dvi:                     Processing Registry/Property directives...
         inf:                     {Install Inf Section [DriverName]}
         inf:                     {Install Inf Section [DriverName] exit (0x00000000)}
         inf:                     {Install Inf Section [DriverName.Hw]}
         inf:                          Empty section
         inf:                     {Install Inf Section [DriverName.Hw] exit (0x00000000)}
         dvi:                     {Writing Device Properties}
         dvi:                          Provider name=ManufacturerName
         dvi:                          DriverVersion=2.0.9.2
         dvi:                          Class name= Device Interface
         dvi:                          Manufacturer=ManufacturerName
         dvi:                          Matching DeviceID=pci\ven_5041&dev_5330&subsys_00000000
         dvi:                          Strong Name=oem6.inf:ManufacturerName.Mfg:DriverName:2.0.9.2:pci\ven_5041&dev_5330&subsys_00000000
         dvi:                     {Writing Device Properties - Complete}
         inf:                     {Install Inf Section [DriverName.Services]}
         inf:                          AddService=PCISercos,0x00000002,PCISercos_Service_Inst,PCISercos_EventLog_Inst  (NameOfInfFile.inf line 53)
         inf:                          ServiceType=1  (NameOfInfFile.inf line 56)
         inf:                          StartType=3  (NameOfInfFile.inf line 57)
         inf:                          ErrorControl=1  (NameOfInfFile.inf line 58)
         inf:                          ServiceBinary=C:\Windows\system32\DRIVERS\DriverName.sys  (NameOfInfFile.inf line 60)
    !!!  dvi:                          Add Service: Binary 'C:\Windows\system32\DRIVERS\DriverName.sys' for service 'DriverName' is not present.
    !!!  inf:                     {Install Inf Section [DriverName.Services] exit(0xe0000217)}
    !!!  dvi:                     Error while installing services.
    !!!  dvi:                     Cleaning up failed installation
         dvi:                {Install DEVICE exit (0xe0000217)}
    !!!  dvi:                Cleaning up failed installation (e0000217)
    !!!  dvi:           Default installer: failed!
         dvi:      {DIF_INSTALLDEVICE - exit(0xe0000217)} 16:56:16.969
    !!!  ndv:      Error(e0000217) installing device!
         ndv:      Device install status=0xe0000217
         ndv:      Performing device install final cleanup...
    !    ndv:      Queueing up error report since device installation failed...
         ndv: {Core Device Install - exit(0xe0000217)} 16:56:16.969
         ump: Server install process exited with code 0xe0000217 16:56:17.578
    <<<   Section end 2013/08/14 16:56:17.578
    <<<   [Exit status: FAILURE(0xe0000217)]

     

    --

    Kind regards,

    Alexey Kisliy


    • Edited by Oleksii Kyslyi Wednesday, August 14, 2013 3:38 PM Added one point
    Wednesday, August 14, 2013 3:33 PM
  • A start type of 4 means you disabled the driver. In this case, you should have a !'ed out device because the driver can't start, setting it to 4 should not allow it to start at all. You should not use a start type of zero, that is for boot start drivers and your driver is not critical for boot. You should set it to 3 (demand start) and then it will load when the device is enumerated.

    As for the code 38, that means you failed to clean up something in the driver and the driver didn't unload, so when the OS tries to load the driver a second time, it can't because it is still in memory. If you have WPP tracing, making sure you unregister. If you create or initialize objects in DriverEntry, make sure you free them in Unload().  Code 38 is a bug in your driver somewhere.


    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Wednesday, August 14, 2013 6:16 PM