Skip to content

The driver do not work on win 2016 server? #36

@zhangwenjian

Description

@zhangwenjian

I build this driver with _NT_TARGET_VERSION Windows 10.0.14393, UMDF version 2.19 and IddCx version 1.2, it works on my win10 desktop. When I try to install the driver on win 2016 server, the driver is failed to load and error is CM_PROB_FAILED_ADD in system log.

I try to windbg and confirm that DllMain is called with true returned, then blocked with this call stack:

0:007> g
UMDF: User-mode debugger found - breaking in.
(1b18.17d4): Break instruction exception - code 80000003 (first chance)
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for C:\Windows\System32\KERNELBASE.dll - 
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for C:\Windows\SYSTEM32\WUDFPlatform.dll - 
KERNELBASE!DebugBreak+0x2:
00007ffa`007a6142 cc              int     3
0:005> g
ModLoad: 00007ff9`f73c0000 00007ff9`f7552000   C:\Windows\System32\dbghelp.dll
Wudfx2000: FxDriverEntrydUm Enter PDRIVER_OBJECT_UM 0x0000019F78ADA4D0
ModLoad: 00007ff9`ebbb0000 00007ff9`ebc46000   C:\Windows\System32\WUDFx02000.dll
Wudfx2000: FxDriverEntryUm: PDRIVER_OBJECT_UM 0x0000019F78ADA4D0 Successfully bound to version library
ModLoad: 00007ff9`f3a10000 00007ff9`f3a3b000   C:\Windows\System32\drivers\UMDF\IddCx.dll
ModLoad: 00007ffa`00a10000 00007ffa`00bd9000   C:\Windows\System32\CRYPT32.dll
ModLoad: 00007ff9`ffc80000 00007ff9`ffc90000   C:\Windows\System32\MSASN1.dll
ModLoad: 00007ffa`009b0000 00007ffa`00a05000   C:\Windows\System32\WINTRUST.dll
UMDF: Breaking on load of module IddCx.dll
UMDF: Waiting 15 seconds for debugger to attach.
UMDF: User-mode debugger found - breaking in.
(1b18.17d4): Break instruction exception - code 80000003 (first chance)
KERNELBASE!DebugBreak+0x2:
00007ffa`007a6142 cc              int     3
0:005> g
Wudfx2000: FxDriverEntrydUm Enter PDRIVER_OBJECT_UM 0x0000019F78AE4DB0
Wudfx2000: FxDriverEntryUm: PDRIVER_OBJECT_UM 0x0000019F78AE4DB0 Successfully bound to version library
Wudfx2000: FxDriverEntryUm: PDRIVER_OBJECT_UM 0x0000019F78AE4DB0 Successfully bound to class library if present
Wudfx2000: FxDriverEntryUm: PDRIVER_OBJECT_UM 0x0000019F78AE4DB0 Successfully returned from driver's DriverEntry
(1b18.17d4): C++ EH exception - code e06d7363 (first chance)
FxStubBindClasses: VersionBindClass WDF_CLASS_BIND_INFO 0x00007FF9F6FEFB90, class IddCx, returned status 0xc000000d
(1b18.17d4): C++ EH exception - code e06d7363 (first chance)
Breakpoint 0 hit
IddSampleDriver!DllMain:
00007ff9`f6fd4ad0 4c89442418      mov     qword ptr [rsp+18h],r8 ss:0000006a`1acfecc0=0000019f78aca7e0
0:005> g
ntdll!NtWaitForWorkViaWorkerFactory+0x14:
00007ffa`03848634 c3              ret
0:002> g
       ^ No runnable debuggees error in 'g'
0:002> g
       ^ No runnable debuggees error in 'g'

It seems DriverEntry was called, but the breakpoint IddSampleDriver!DriverEntry not triggered.
I read the following article of msdn but don't what to do next.
https://learn.microsoft.com/en-us/windows-hardware/drivers/wdf/determining-why-the-umdf-driver-fails-to-load-or-the-umdf-device-fails

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions