I know others have run into this problem as well. But, I’ve read over previous discussions on this topic and I still cannot determine what the fix for my issue is. So, I thought I would ask the experts here. The following code works during DriverEntry of my WDF driver with no problems.
Use_decl_annotations
NTSTATUS DriverEntry(PDRIVER_OBJECT pDriverObject, PUNICODE_STRING pRegistryPath)
{
NTSTATUS Status;
WDF_DRIVER_CONFIG LDTPITDrvConfig;
WDF_OBJECT_ATTRIBUTES LDTPITDrvAttributes, LDTPITRegistryPathAttributes;
WDFDRIVER LDTPITDriver;
PLDTPIT_DRIVER_EXTENSION pDriverExt;
#if DBG
//
// Initialize DbgPrintEx stuff for LDTPIT driver
//
sprintf_s(DebugPrintHeader, sizeof(DebugPrintHeader), "%s ", VER_INTERNALNAME_STR);
strcat_s(DebugPrintHeader, sizeof(DebugPrintHeader), "(%x) ");
DebugLevel = LD_DBGMSG_RESOURCES | LD_DBGMSG_DISPATCH;
#endif /* DBG */
//
// Initialize the driver configuration structure
//
WDF_DRIVER_CONFIG_INIT(&LDTPITDrvConfig, LDTPITAddDevice);
LDTPITDrvConfig.EvtDriverUnload = LDTPITDriverUnload;
WDF_OBJECT_ATTRIBUTES_INIT_CONTEXT_TYPE(&LDTPITDrvAttributes, LDTPIT_DRIVER_EXTENSION);
LDTPITDrvAttributes.ExecutionLevel = WdfExecutionLevelPassive;
LDTPITDrvAttributes.EvtCleanupCallback = LDTPITDriverCleanupCallback;
//
// Finally, create the driver object
//
Status = WdfDriverCreate(pDriverObject, pRegistryPath, &LDTPITDrvAttributes, &LDTPITDrvConfig,
&LDTPITDriver);
if (!NT_SUCCESS(Status))
{
goto end;
}
But, when KMDF Verifier is enabled. I get the following Status. Status = 0xC000009A
I’ve enabled “Verbose Logging” on my driver and the following information shown is immediately after the call to WdfDriverCreate() is executed.
!wdfkd.wdflogdump ldtpit.sys
<---------------------------------------------- Verbose Information ----------------------------------------------------->
Trace searchpath is:
Trace format prefix is: %7!u!: %!FUNC! -
Trying to extract TMF information from - c:\users\joe moriarty\symbols\Wdf01000.pdb\11E877268FAE7196F0AA5A416B1A36E01\Wdf01000.pdb
Gather log: Please wait, this may take a moment (reading 4024 bytes).
% read so far … 10, 100
There are 10 log entries
— start of log —
1: FxIFRStart - FxIFR logging started
2: FxInitialize - Initialize globals for \REGISTRY\MACHINE\SYSTEM\ControlSet001\Services\LDTPIT
3: FxPoolInitialize - Initializing Pool 0xFFFFE48AD89AA138, Tracking 1
4: FxPoolAllocator - Allocation Fail Count exceeded
5: FxVerifierLock::AllocateThreadTable - No Memory to allocate thread table
6: LockVerifierSection - Increment Lock counter (1) for Verifier Paged Memory from \REGISTRY\MACHINE\SYSTEM\ControlSet001\Services\LDTPIT from driver globals FFFFE48AD89AA0D0
7: FxPoolAllocator - Allocation Fail Count exceeded
8: FxPoolDestroy - Destroying Pool 0xFFFFE48AD89AA138
9: FxPoolDump - FxPoolDump: NonPagedBytes 0, PagedBytes 0, NonPagedAllocations 0, PagedAllocations 0,PeakNonPagedBytes 0, PeakPagedBytes 0,FxPoolDump: PeakNonPagedAllocations 0, PeakPagedAllocations 0
10: UnlockVerifierSection - Decrement UnLock counter (0) for Verifier Paged Memory with driver globals FFFFE48AD89AA0D0
---- end of log ----
!wdfkd.wdfdriverinfo ldtpit.sys
<------------------------------------------ WDF DriverInfo ------------------------------------------------------------------------>
Default driver image name: ldtpit
WDF library image name:
FxDriverGlobals 0xffffe48ad89aa0d0
WdfBindInfo 0xfffff800bf987090
Version v1.15
Library module 0xffffe48ad5e4e1e0
ServiceName \Registry\Machine\System\CurrentControlSet\Services\Wdf01000
ImageName Wdf01000
Driver Handles is NULL
Any Ideas?
Thanks In Advance for the Help,
Joe