ReactOS  0.4.15-dev-3187-ge372f2b
fxdriverapi.cpp File Reference
#include "coreprivshared.hpp"
#include <ntverp.h>
#include "fxtelemetry.hpp"
Include dependency graph for fxdriverapi.cpp:

Go to the source code of this file.

Functions

 __drv_maxIRQL (PASSIVE_LEVEL) PWSTR STDCALL WDFEXPORT(WdfDriverGetRegistryPath)(__in PWDF_DRIVER_GLOBALS DriverGlobals
 
 FxObjectHandleGetPtrAndGlobals (GetFxDriverGlobals(DriverGlobals), Driver, FX_TYPE_DRIVER,(PVOID *)&pDriver, &pFxDriverGlobals)
 
 if (!NT_SUCCESS(status))
 
return pDriver GetRegistryPathUnicodeString () -> Buffer
 
VOID RosInitWdf ()
 
 FxPointerNotNull (pFxDriverGlobals, DriverObject)
 
 FxPointerNotNull (pFxDriverGlobals, RegistryPath)
 
 FxPointerNotNull (pFxDriverGlobals, DriverConfig)
 
 WDFCASSERT (sizeof(WDF_DRIVER_CONFIG_V1_0)==sizeof(WDF_DRIVER_CONFIG_V1_1))
 
 if (DriverConfig->Size !=sizeof(WDF_DRIVER_CONFIG) &&DriverConfig->Size !=sizeof(WDF_DRIVER_CONFIG_V1_1))
 
 if ((DriverConfig->DriverInitFlags &~validFlags) !=0)
 
 if (pFxDriverGlobals->Driver !=NULL||pFxDriverGlobals->Public.Driver !=NULL)
 
 if (Driver !=NULL)
 
 if (DriverConfig->Size==sizeof(WDF_DRIVER_CONFIG) &&DriverConfig->DriverPoolTag !=0x0 &&DriverConfig->DriverPoolTag !=' kdD')
 
 if (DriverConfig->DriverInitFlags &WdfDriverInitNoDispatchOverride)
 
else if ((DriverConfig->DriverInitFlags &WdfDriverInitNonPnpDriver) &&DriverConfig->EvtDriverDeviceAdd !=NULL)
 
 FxInitialize (pFxDriverGlobals, DriverObject, RegistryPath, DriverConfig)
 
 if (pDriver !=NULL)
 
 if (NT_SUCCESS(status))
 
 UNREFERENCED_PARAMETER (DriverGlobals)
 
 UNREFERENCED_PARAMETER (DriverObject)
 
 UNREFERENCED_PARAMETER (EvtTraceCallback)
 
 UNREFERENCED_PARAMETER (ControlBlock)
 
 FxPointerNotNull (pFxDriverGlobals, String)
 
 FxObjectHandleGetPtr (pFxDriverGlobals, String, FX_TYPE_STRING,(PVOID *)&pString)
 
 FxPointerNotNull (pFxDriverGlobals, VersionAvailableParams)
 
 if (VersionAvailableParams->Size !=sizeof(WDF_DRIVER_VERSION_AVAILABLE_PARAMS))
 
 DoTraceLevelMessage (pFxDriverGlobals, TRACE_LEVEL_INFORMATION, TRACINGDRIVER, "IsVersionAvailable, current WDF ver major %d, minor %d, caller asking " "about major %d, minor %d", major, minor, VersionAvailableParams->MajorVersion, VersionAvailableParams->MinorVersion)
 
 if (VersionAvailableParams->MajorVersion==major &&VersionAvailableParams->MinorVersion<=minor)
 

Variables

__in WDFDRIVER Driver
 
PFX_DRIVER_GLOBALS pFxDriverGlobals = GetFxDriverGlobals(DriverGlobals)
 
NTSTATUS status = FxVerifierCheckIrqlLevel(pFxDriverGlobals, PASSIVE_LEVEL)
 
FxDriverpDriver
 
_Must_inspect_result_ __in MdDriverObject DriverObject
 
_Must_inspect_result_ __in MdDriverObject __in PCUNICODE_STRING RegistryPath
 
_Must_inspect_result_ __in MdDriverObject __in PCUNICODE_STRING __in_opt PWDF_OBJECT_ATTRIBUTES DriverAttributes
 
_Must_inspect_result_ __in MdDriverObject __in PCUNICODE_STRING __in_opt PWDF_OBJECT_ATTRIBUTES __in PWDF_DRIVER_CONFIG DriverConfig
 
WDFDRIVER hDriver = NULL
 
const LONG validFlags
 
 DriverGlobals = WdfDriverGlobals
 
 else
 
_Must_inspect_result_ __in PDRIVER_OBJECT __in PFN_WDF_TRACE_CALLBACK EvtTraceCallback
 
_Must_inspect_result_ __in PDRIVER_OBJECT __in PFN_WDF_TRACE_CALLBACK __in PVOID ControlBlock
 
return STATUS_NOT_SUPPORTED
 
_Must_inspect_result_ __in WDFDRIVER __in WDFSTRING String
 
FxStringpString
 
const PWCHAR pVersionStr
 
const PWCHAR pVersionStrVerifier
 
_Must_inspect_result_ __in WDFDRIVER __in PWDF_DRIVER_VERSION_AVAILABLE_PARAMS VersionAvailableParams
 
ULONG major = __WDF_MAJOR_VERSION
 
ULONG minor = __WDF_MINOR_VERSION
 
return FALSE
 

Function Documentation

◆ __drv_maxIRQL()

__drv_maxIRQL ( PASSIVE_LEVEL  )

◆ DoTraceLevelMessage()

DoTraceLevelMessage ( pFxDriverGlobals  ,
TRACE_LEVEL_INFORMATION  ,
TRACINGDRIVER  ,
IsVersionAvailable,
current WDF ver major d,
minor d,
caller asking " "about major d,
minor %d ,
major  ,
minor  ,
VersionAvailableParams->  MajorVersion,
VersionAvailableParams->  MinorVersion 
)

Referenced by if().

◆ FxInitialize()

FxInitialize ( pFxDriverGlobals  ,
DriverObject  ,
RegistryPath  ,
DriverConfig   
)

◆ FxObjectHandleGetPtr()

FxObjectHandleGetPtr ( pFxDriverGlobals  ,
String  ,
FX_TYPE_STRING  ,
(PVOID *)&  pString 
)

◆ FxObjectHandleGetPtrAndGlobals()

FxObjectHandleGetPtrAndGlobals ( GetFxDriverGlobals(DriverGlobals ,
Driver  ,
FX_TYPE_DRIVER  ,
(PVOID *)&  pDriver,
pFxDriverGlobals 
)

◆ FxPointerNotNull() [1/5]

FxPointerNotNull ( pFxDriverGlobals  ,
DriverObject   
)

◆ FxPointerNotNull() [2/5]

FxPointerNotNull ( pFxDriverGlobals  ,
RegistryPath   
)

◆ FxPointerNotNull() [3/5]

FxPointerNotNull ( pFxDriverGlobals  ,
DriverConfig   
)

◆ FxPointerNotNull() [4/5]

FxPointerNotNull ( pFxDriverGlobals  ,
String   
)

◆ FxPointerNotNull() [5/5]

FxPointerNotNull ( pFxDriverGlobals  ,
VersionAvailableParams   
)

◆ GetRegistryPathUnicodeString()

return pDriver GetRegistryPathUnicodeString ( ) -> Buffer

◆ if() [1/12]

if ( NT_SUCCESSstatus)

Definition at line 68 of file fxdriverapi.cpp.

68  {
69  return NULL;
70  }
#define NULL
Definition: types.h:112

◆ if() [2/12]

Definition at line 122 of file fxdriverapi.cpp.

124  {
125 
129  "WDF_DRIVER_CONFIG got Size %d, expected v1.1 size %d or cur ver size %d, %!STATUS!",
130  DriverConfig->Size,
132 
133  return status;
134  }
#define STATUS_INFO_LENGTH_MISMATCH
Definition: udferr_usr.h:133
#define TRACINGDRIVER
Definition: dbgtrace.h:68
PFX_DRIVER_GLOBALS pFxDriverGlobals
Definition: fxdriverapi.cpp:57
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_INFORMATION, TRACINGDRIVER, "IsVersionAvailable, current WDF ver major %d, minor %d, caller asking " "about major %d, minor %d", major, minor, VersionAvailableParams->MajorVersion, VersionAvailableParams->MinorVersion)
#define TRACE_LEVEL_ERROR
Definition: storswtr.h:27
NTSTATUS status
Definition: fxdriverapi.cpp:58
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING _In_opt_ PWDF_OBJECT_ATTRIBUTES _In_ PWDF_DRIVER_CONFIG DriverConfig
Definition: wdfdriver.h:213
Definition: ps.c:97

◆ if() [3/12]

if ( (DriverConfig->DriverInitFlags &~validFlags) !  = 0)

Definition at line 139 of file fxdriverapi.cpp.

139  {
143  "DriverInitFlags 0x%x invalid, valid flags are 0x%x, %!STATUS!",
144  DriverConfig->DriverInitFlags, validFlags, status);
145  return status;
146  }
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
#define TRACINGDRIVER
Definition: dbgtrace.h:68
PFX_DRIVER_GLOBALS pFxDriverGlobals
Definition: fxdriverapi.cpp:57
const LONG validFlags
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_INFORMATION, TRACINGDRIVER, "IsVersionAvailable, current WDF ver major %d, minor %d, caller asking " "about major %d, minor %d", major, minor, VersionAvailableParams->MajorVersion, VersionAvailableParams->MinorVersion)
#define TRACE_LEVEL_ERROR
Definition: storswtr.h:27
NTSTATUS status
Definition: fxdriverapi.cpp:58
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING _In_opt_ PWDF_OBJECT_ATTRIBUTES _In_ PWDF_DRIVER_CONFIG DriverConfig
Definition: wdfdriver.h:213
Definition: ps.c:97

◆ if() [4/12]

Definition at line 163 of file fxdriverapi.cpp.

164  {
165 
167 
169  "WdfDriverCreate can only be called one time per "
170  "WDM PDRIVER_OBJECT %p, %!STATUS!",
172 
173  return status;
174  }
#define TRACINGDRIVER
Definition: dbgtrace.h:68
PFX_DRIVER_GLOBALS pFxDriverGlobals
Definition: fxdriverapi.cpp:57
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_INFORMATION, TRACINGDRIVER, "IsVersionAvailable, current WDF ver major %d, minor %d, caller asking " "about major %d, minor %d", major, minor, VersionAvailableParams->MajorVersion, VersionAvailableParams->MinorVersion)
_Must_inspect_result_ _In_ PDRIVER_OBJECT DriverObject
Definition: wdfdriver.h:213
#define STATUS_DRIVER_INTERNAL_ERROR
Definition: udferr_usr.h:177
#define TRACE_LEVEL_ERROR
Definition: storswtr.h:27
NTSTATUS status
Definition: fxdriverapi.cpp:58
Definition: ps.c:97

◆ if() [5/12]

if ( Driver = NULL)

Definition at line 176 of file fxdriverapi.cpp.

176  {
177  *Driver = NULL;
178  }
#define NULL
Definition: types.h:112
_Must_inspect_result_ _In_ WDFDRIVER Driver
Definition: wdfcontrol.h:83

◆ if() [6/12]

if ( DriverConfig->  Size = sizeof(WDF_DRIVER_CONFIG) && DriverConfig->DriverPoolTag != 0x0 && DriverConfig->DriverPoolTag != ' kdD')

Definition at line 196 of file fxdriverapi.cpp.

198  {
199  //
200  // Copy directly using the driver's value
201  //
202  pFxDriverGlobals->Tag = DriverConfig->DriverPoolTag;
203  pFxDriverGlobals->Public.DriverTag = DriverConfig->DriverPoolTag;
204  }
PFX_DRIVER_GLOBALS pFxDriverGlobals
Definition: fxdriverapi.cpp:57
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING _In_opt_ PWDF_OBJECT_ATTRIBUTES _In_ PWDF_DRIVER_CONFIG DriverConfig
Definition: wdfdriver.h:213

◆ if() [7/12]

if ( DriverConfig->DriverInitFlags &  WdfDriverInitNoDispatchOverride)

Definition at line 217 of file fxdriverapi.cpp.

217  {
218  DO_NOTHING();
219  }
#define DO_NOTHING()
Definition: mxgeneral.h:32

◆ if() [8/12]

else if ( (DriverConfig->DriverInitFlags &WdfDriverInitNonPnpDriver) &&DriverConfig->EvtDriverDeviceAdd !  = NULL)

Definition at line 220 of file fxdriverapi.cpp.

221  {
222 
224  "Invalid Driver flags or EvtDriverDeviceAdd callback already added"
225  "STATUS_INVALID_PARAMETER");
226 
228  }
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
#define TRACINGDRIVER
Definition: dbgtrace.h:68
PFX_DRIVER_GLOBALS pFxDriverGlobals
Definition: fxdriverapi.cpp:57
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_INFORMATION, TRACINGDRIVER, "IsVersionAvailable, current WDF ver major %d, minor %d, caller asking " "about major %d, minor %d", major, minor, VersionAvailableParams->MajorVersion, VersionAvailableParams->MinorVersion)
#define TRACE_LEVEL_ERROR
Definition: storswtr.h:27

◆ if() [9/12]

if ( pDriver = NULL)

Definition at line 251 of file fxdriverapi.cpp.

251  {
252 
253  if (NT_SUCCESS(status)) {
254 
256 
257  if (NT_SUCCESS(status)) {
259  }
260  }
261  }
_Must_inspect_result_ NTSTATUS Commit(__in_opt PWDF_OBJECT_ATTRIBUTES Attributes, __out_opt WDFOBJECT *ObjectHandle, __in_opt FxObject *Parent=NULL, __in BOOLEAN AssignDriverAsDefaultParent=TRUE)
Definition: fxobject.cpp:904
_Must_inspect_result_ NTSTATUS Initialize(__in PCUNICODE_STRING RegistryPath, __in PWDF_DRIVER_CONFIG Config, __in_opt PWDF_OBJECT_ATTRIBUTES DriverAttributes)
Definition: fxdriver.cpp:334
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING RegistryPath
Definition: wdfdriver.h:213
_In_ LPWSTR _In_ ULONG _In_ ULONG _In_ ULONG _Out_ DEVINFO _In_ HDEV _In_ LPWSTR _In_ HANDLE hDriver
Definition: winddi.h:3553
FxDriver * pDriver
Definition: fxdriverapi.cpp:59
return FALSE
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING _In_opt_ PWDF_OBJECT_ATTRIBUTES DriverAttributes
Definition: wdfdriver.h:213
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING _In_opt_ PWDF_OBJECT_ATTRIBUTES _In_ PWDF_DRIVER_CONFIG DriverConfig
Definition: wdfdriver.h:213
Definition: ps.c:97

◆ if() [10/12]

if ( NT_SUCCESS(status )

Definition at line 271 of file fxdriverapi.cpp.

271  {
272  //
273  // **** Note ****
274  // Do not introduce failures after this point without ensuring
275  // FxObject::DeleteFromFailedCreate has a chance to clear out any
276  // assigned callbacks on the object.
277  //
278 
279  //
280  // Store the WDFDRIVER and FxDriver* globally so the driver can retrieve
281  // it anytime.
282  //
284  pFxDriverGlobals->Public.Driver = hDriver;
285 
286  //
287  // Record the flags so that diagnostics knows what type of driver it is.
288  //
289  pFxDriverGlobals->Public.DriverFlags |= DriverConfig->DriverInitFlags;
290 
291  if (DriverConfig->DriverInitFlags &
293  //
294  // If there is no dispatch override or if it is an NT4 legacy style
295  // driver then we will not displace unload in the stub if one was not
296  // specified.
297  //
298  if (DriverConfig->EvtDriverUnload != NULL) {
299  pFxDriverGlobals->Public.DisplaceDriverUnload = TRUE;
300  }
301  else {
302  pFxDriverGlobals->Public.DisplaceDriverUnload = FALSE;
303  }
304  }
305  else {
306  pFxDriverGlobals->Public.DisplaceDriverUnload = TRUE;
307  }
308 
309  if (Driver != NULL) {
310  *Driver = hDriver;
311  }
312 
313 #ifndef __REACTOS__
314  if (FX_TELEMETRY_ENABLED(g_TelemetryProvider, pFxDriverGlobals)) {
315  FxAutoString imageName;
316 
317 #if (FX_CORE_MODE == FX_CORE_KERNEL_MODE)
318  const PWCHAR pVersionStr =
319  FX_MAKE_WSTR(__WDF_MAJOR_VERSION_STRING) L"."
320  FX_MAKE_WSTR(__WDF_MINOR_VERSION_STRING) L"."
321  FX_MAKE_WSTR(__WDF_BUILD_NUMBER) ;
322 #else // USER_MODE
323  const PWCHAR pVersionStr =
324  FX_MAKE_WSTR(__WUDF_MAJOR_VERSION_STRING) L"."
325  FX_MAKE_WSTR(__WUDF_MINOR_VERSION_STRING) L"."
326  FX_MAKE_WSTR(__WUDF_SERVICE_VERSION) ;
327 #endif
328 
329  //
330  // GetImageName can fail if the registry cannot be accessed. This
331  // can happen during system shutdown. Since the image name is only
332  // used for telemetry the failure can be ignored.
333  //
335 
336  WDF_CENSUS_EVT_WRITE_DRIVER_LOAD(g_TelemetryProvider,
338  imageName.m_UnicodeString.Buffer,
339  pVersionStr);
340  }
341 #endif // __REACTOS__
342  }
#define TRUE
Definition: types.h:120
uint16_t * PWCHAR
Definition: typedefs.h:56
_Must_inspect_result_ NTSTATUS GetImageName(_In_ PFX_DRIVER_GLOBALS DriverGlobals, _Out_ PUNICODE_STRING ImageName)
PFX_DRIVER_GLOBALS pFxDriverGlobals
Definition: fxdriverapi.cpp:57
FxDriver * pDriver
Definition: fxdriverapi.cpp:59
FxDriver * Driver
Definition: fxglobals.h:374
#define FX_TELEMETRY_ENABLED(TraceHandle, Globals)
Definition: fxtelemetry.hpp:45
return FALSE
#define WDF_CENSUS_EVT_WRITE_DRIVER_LOAD(TraceHandle, Globals, DrvImage, WdfVersion)
Definition: fxtelemetry.hpp:72
WDFDRIVER hDriver
static const WCHAR L[]
Definition: oid.c:1250
#define VOID
Definition: acefi.h:82
const PWCHAR pVersionStr
#define FX_MAKE_WSTR(x)
Definition: fxmacros.hpp:264
#define NULL
Definition: types.h:112
UNICODE_STRING m_UnicodeString
_Must_inspect_result_ _In_ WDFDRIVER Driver
Definition: wdfcontrol.h:83
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING _In_opt_ PWDF_OBJECT_ATTRIBUTES _In_ PWDF_DRIVER_CONFIG DriverConfig
Definition: wdfdriver.h:213

◆ if() [11/12]

Definition at line 499 of file fxdriverapi.cpp.

499  {
501 
504  "VersionAvailableParams Size 0x%x, expected 0x%x, %!STATUS!",
506  status);
507 
508  return FALSE;
509  }
#define STATUS_INFO_LENGTH_MISMATCH
Definition: udferr_usr.h:133
#define TRACINGDRIVER
Definition: dbgtrace.h:68
_Must_inspect_result_ _In_ WDFDRIVER _In_ PWDF_DRIVER_VERSION_AVAILABLE_PARAMS VersionAvailableParams
Definition: wdfdriver.h:436
PFX_DRIVER_GLOBALS pFxDriverGlobals
Definition: fxdriverapi.cpp:57
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_INFORMATION, TRACINGDRIVER, "IsVersionAvailable, current WDF ver major %d, minor %d, caller asking " "about major %d, minor %d", major, minor, VersionAvailableParams->MajorVersion, VersionAvailableParams->MinorVersion)
return FALSE
#define TRACE_LEVEL_ERROR
Definition: storswtr.h:27
Definition: ps.c:97

◆ if() [12/12]

if ( VersionAvailableParams->  MajorVersion = major && VersionAvailableParams->MinorVersion <= minor)

Definition at line 527 of file fxdriverapi.cpp.

528  {
529  return TRUE;
530  }
#define TRUE
Definition: types.h:120

◆ RosInitWdf()

VOID RosInitWdf ( )

Definition at line 53 of file reactos_special.cpp.

54 {
57 
58  WdfBindInfo.Size = sizeof(WDF_BIND_INFO);
61  WdfBindInfo.Version.Build = 7600;
63  WdfBindInfo.FuncTable = (WDFFUNC *)(&WdfVersion.Functions);
67 }
struct _WDF_BIND_INFO WDF_BIND_INFO
ULONG Size
Definition: fxldr.h:131
ULONG dwMinorVersion
Definition: rtltypes.h:271
ULONG FuncCount
Definition: fxldr.h:134
RTL_OSVERSIONINFOEXW OsVersionInfo
Definition: fxglobals.h:770
VOID(* WDFFUNC)(VOID)
ULONG dwMajorVersion
Definition: rtltypes.h:270
WDF_VERSION Version
Definition: fxldr.h:133
WDFFUNCTIONS Functions
Definition: fxdynamics.h:594
WDF_BUILD_NUMBER Build
Definition: fxldr.h:124
PWDF_BIND_INFO WdfBindInfo
Definition: fxglobals.h:405
WDF_MAJOR_VERSION Major
Definition: fxldr.h:122
FxLibraryGlobalsType FxLibraryGlobals
Definition: globals.cpp:95
_Must_inspect_result_ PWDF_DRIVER_GLOBALS FxAllocateDriverGlobals(VOID)
Definition: globals.cpp:1052
PWDF_DRIVER_GLOBALS WdfDriverGlobals
PFX_DRIVER_GLOBALS fxDriverGlobals
WDF_BIND_INFO WdfBindInfo
__inline PFX_DRIVER_GLOBALS GetFxDriverGlobals(__in PWDF_DRIVER_GLOBALS DriverGlobals)
Definition: fxglobals.h:597
WDFVERSION WdfVersion
ULONG FuncCount
Definition: fxdynamics.h:593
WDF_MINOR_VERSION Minor
Definition: fxldr.h:123

◆ UNREFERENCED_PARAMETER() [1/4]

UNREFERENCED_PARAMETER ( DriverGlobals  )

◆ UNREFERENCED_PARAMETER() [2/4]

UNREFERENCED_PARAMETER ( DriverObject  )

◆ UNREFERENCED_PARAMETER() [3/4]

UNREFERENCED_PARAMETER ( EvtTraceCallback  )

◆ UNREFERENCED_PARAMETER() [4/4]

UNREFERENCED_PARAMETER ( ControlBlock  )

◆ WDFCASSERT()

Variable Documentation

◆ ControlBlock

◆ Driver

Initial value:
{
#define DDI_ENTRY()
Definition: fxglobalskm.h:56

Definition at line 54 of file fxdriverapi.cpp.

◆ DriverAttributes

◆ DriverConfig

◆ DriverGlobals

DriverGlobals = WdfDriverGlobals

Definition at line 107 of file fxdriverapi.cpp.

Referenced by __deref_opt_out_bcount(), __deref_out_range(), __drv_strictTypeMatch(), __drv_when(), __in_bcount_opt(), __in_ecount(), __in_xcount(), __out_bcount(), _Acquires_lock_(), FxDevice::_AllocAndQueryPropertyEx(), FxMemoryBuffer::_Create(), FxPkgFdo::_Create(), FxIoQueue::_Create(), FxInterruptThreadpool::_CreateAndInit(), FxRegisterResourceInfo::_CreateAndInit(), FxPortResourceInfo::_CreateAndInit(), FxMessageDispatch::_CreateAndInitialize(), _Deref_out_range_(), _In_reads_(), _In_reads_bytes_opt_(), _Out_writes_bytes_(), _Outptr_opt_result_bytebuffer_(), FxDevice::_QueryPropertyEx(), _Requires_lock_held_(), _Requires_lock_not_held_(), _When_(), AddEventHooksWdfDeviceCreate(), AddEventHooksWdfIoQueueCreate(), IdleTimeoutManagement::CommitPowerFrameworkSettings(), FxRequestMemory::Create(), IdleTimeoutManagement::FreezeIdleTimeoutManagementStatus(), FxFreeDriverGlobals(), GetFxDriverGlobals(), GetImageName(), GetStackCapabilities(), if(), FxEventQueue::Initialize(), IsLoggingEnabledAndNeeded(), LogDeviceStartTelemetryEvent(), LogDriverInfoStream(), RegistryReadLastLoggedTime(), RegistryWriteCurrentTime(), ResumeIdleWorker(), SetD3ColdSupport(), StopIdleWorker(), switch(), IdleTimeoutManagement::UseSystemManagedIdleTimeout(), VerifyCriticalRegionExit(), VerifyIrqlExit(), VerifyWdfDeviceWdmDispatchIrp(), VfAllocateContext(), WdfCxVerifierKeBugCheck(), WdfDriverMiniportUnload(), WdfGetTriageInfo(), WdfInterruptGetDevice(), WdfInterruptQueueDpcForIsr(), WdfInterruptQueueWorkItemForIsr(), WdfInterruptWdmGetInterrupt(), WdfObjectAllocateContext(), WdfObjectContextGetObject(), WdfObjectDereferenceActual(), WdfObjectGetTypedContextWorker(), WdfObjectReferenceActual(), WdfRequestSend(), WdfVerifierDbgBreakPoint(), WdfVerifierKeBugCheck(), and WdfWaitLockAcquire().

◆ DriverObject

◆ else

else
Initial value:
{
PFX_DRIVER_GLOBALS pFxDriverGlobals
Definition: fxdriverapi.cpp:57
static VOID _InitializeTag(__in PFX_DRIVER_GLOBALS Globals, __in PWDF_DRIVER_CONFIG Config)
Definition: fxdriver.cpp:266
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING _In_opt_ PWDF_OBJECT_ATTRIBUTES _In_ PWDF_DRIVER_CONFIG DriverConfig
Definition: wdfdriver.h:213

Definition at line 205 of file fxdriverapi.cpp.

◆ EvtTraceCallback

◆ FALSE

return FALSE

Definition at line 532 of file fxdriverapi.cpp.

Referenced by if().

◆ hDriver

Definition at line 102 of file fxdriverapi.cpp.

Referenced by if().

◆ major

◆ minor

◆ pDriver

FxDriver* pDriver
Initial value:
_Must_inspect_result_ __in MdDriverObject __in PCUNICODE_STRING __in_opt PWDF_OBJECT_ATTRIBUTES DriverAttributes
Definition: fxdriverapi.cpp:86
PFX_DRIVER_GLOBALS pFxDriverGlobals
Definition: fxdriverapi.cpp:57
_Must_inspect_result_ _In_ PDRIVER_OBJECT DriverObject
Definition: wdfdriver.h:213
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING _In_opt_ PWDF_OBJECT_ATTRIBUTES _In_ PWDF_DRIVER_CONFIG DriverConfig
Definition: wdfdriver.h:213

Definition at line 59 of file fxdriverapi.cpp.

Referenced by if().

◆ pFxDriverGlobals

Definition at line 57 of file fxdriverapi.cpp.

Referenced by if().

◆ pString

FxString* pString

Definition at line 396 of file fxdriverapi.cpp.

◆ pVersionStr

const PWCHAR pVersionStr
Initial value:
=
L"Kernel Mode Driver Framework version "
FX_MAKE_WSTR(__WDF_MAJOR_VERSION_STRING) L"."
FX_MAKE_WSTR(__WDF_MINOR_VERSION_STRING) L"."
FX_MAKE_WSTR(__WDF_BUILD_NUMBER)
static const WCHAR L[]
Definition: oid.c:1250
#define FX_MAKE_WSTR(x)
Definition: fxmacros.hpp:264

Definition at line 400 of file fxdriverapi.cpp.

Referenced by if().

◆ pVersionStrVerifier

const PWCHAR pVersionStrVerifier
Initial value:
=
L"Kernel Mode Driver Framework (verifier on) version "
FX_MAKE_WSTR(__WDF_MAJOR_VERSION_STRING) L"."
FX_MAKE_WSTR(__WDF_MINOR_VERSION_STRING) L"."
FX_MAKE_WSTR(__WDF_BUILD_NUMBER)
static const WCHAR L[]
Definition: oid.c:1250
#define FX_MAKE_WSTR(x)
Definition: fxmacros.hpp:264

Definition at line 406 of file fxdriverapi.cpp.

◆ RegistryPath

◆ status

Definition at line 58 of file fxdriverapi.cpp.

Referenced by if().

◆ STATUS_NOT_SUPPORTED

return STATUS_NOT_SUPPORTED

Definition at line 376 of file fxdriverapi.cpp.

Referenced by __drv_when(), _Dispatch_type_(), FxPkgPdo::_DispatchPowerSequence(), FxQueryInterface::_FormatIrp(), _Function_class_(), _IRQL_requires_max_(), FxPkgPdo::_PnpQueryId(), FxPkgFdo::_PnpQueryPnpDeviceState(), ACPIDispatchDeviceControl(), add_calc_job_comp(), add_calc_job_decomp(), add_device(), AddBootStoreEntry(), AfdDispatch(), agpintrf_Constructor(), arbusno_Constructor(), ArchInitializeContext(), ario_Constructor(), armem_Constructor(), FxPkgFdo::AskParentToRemoveAndReenumerate(), AuxKlibInitialize(), BatteryClassIoctl(), BiConvertRegistryDataToElement(), BlFwEnumerateDevice(), BlockIoEfiGetDeviceInformation(), BlpFwInitialize(), BmpCreateDevices(), BmpTransferExecution(), Bus_GetDeviceCapabilities(), Bus_PDO_Power(), Bus_PDO_QueryDeviceId(), Bus_PDO_QueryInterface(), CaptureInitializeUrbAndIrp(), check_nfs41_create_args(), check_nfs41_getacl_args(), check_nfs41_setacl_args(), CheckFileSystemPage(), ChkdskFileSystem_UStr(), ClassDeviceControl(), ClassDeviceHwFirmwareActivateProcess(), ClassDeviceHwFirmwareDownloadProcess(), ClassGetLBProvisioningResources(), ClassInterpretLBProvisioningLogPage(), ClassModeSelect(), ClasspAccessAlignmentProperty(), ClasspDeviceGetLBAStatusWorker(), ClasspDeviceLBProvisioningProperty(), ClasspDeviceMediaTypeProperty(), ClasspDeviceSeekPenaltyProperty(), ClasspDeviceTrimProcess(), ClasspDeviceTrimProperty(), ClasspDuidQueryProperty(), ClasspGetInquiryVpdSupportInfo(), ClasspInitializeGesn(), ClasspLowerLayerNotSupport(), ClassPnp(), ClasspPowerHandler(), ClasspPowerUpCompletion(), ClasspPrepareMcnIrp(), ClasspPriorityHint(), ClasspStorageEventNotification(), ClasspWriteCacheProperty(), ClassSendDeviceIoControlSynchronous(), CloseBootStore(), CmBattGetAcpiInterfaces(), CmBattIoctl(), CmBattPnpDispatch(), CmBattSetStatusNotify(), CompBattIoctl(), CompBattPnpDispatch(), CompBattSystemControl(), ConioResizeBuffer(), ConsoleEfiGopOpen(), CreateMailslotW(), CreateNamedPipeW(), DeleteBootStoreEntry(), DeviceIoctlPassive(), DiskEnableInfoExceptions(), DiskGetCacheInformation(), DiskGetInfoExceptionInformation(), DiskGetModePage(), DiskIoctlClearVerify(), DiskIoctlSetVerify(), DiskSetCacheInformation(), FxPkgGeneral::Dispatch(), DsppInitialize(), duplicate_extents(), EfiConnectController(), EfiGetEfiStatusCode(), EfiGetNtStatusCode(), EfiVmOpenProtocol(), Ext2LinuxError(), Ext2WinntError(), FastIoQueryStandardInfo(), FastIoRead(), FastIoWrite(), FdcFdoPnp(), FdcPdoQueryId(), FDO_QueryCapabilities(), FdoRead(), FdoWrite(), FltpDeviceControlHandler(), FormatFileSystem_UStr(), FormatPartitionPage(), FxUsbPipeContinuousReader::FormatRepeater(), FxPowerPolicyOwnerSettings::FxPowerPolicyOwnerSettings(), get_alg_property(), GetBusInterface(), GetDeviceId(), GetStackCapabilities(), FxIoTargetRemote::GetTargetDeviceRelations(), HalpDispatchPnp(), HalpNoAssignSlotResources(), HalpQueryCapabilities(), HalpQueryDeviceRelations(), HalpQueryIdFdo(), HalpQueryIdPdo(), HalpQueryInterface(), HalpQueryResourceRequirements(), HalpQueryResources(), FxPkgPnp::HandleQueryBusRelations(), FxPkgPnp::HandleQueryDeviceRelations(), FxPkgPnp::HandleQueryInterface(), FxPkgPnp::HandleQueryInterfaceForPowerThread(), HDA_PDOHandleQueryInterface(), HidClassFDO_QueryCapabilities(), HidClassPDO_PnP(), IdleNotificationRequestComplete(), if(), IKsAllocator_fnDeviceIoControl(), IKsDevice_fnQueryInterface(), IKsFilter_fnQueryInterface(), IKsFilterFactory_fnQueryInterface(), IKsPin_fnQueryInterface(), ImgpGetFileSize(), InitCapturePin(), FxUsbDevice::InitDevice(), InitStreamPin(), InstallFatBootcodeToFloppy(), InstallVBRToPartition(), IntKeyboardUpdateLeds(), IoCreateDisk(), IoInvalidateDeviceState(), IopFilterResourceRequirements(), IopInitiatePnpIrp(), IopQueryDeviceCapabilities(), IopSynchronousCall(), IoReadPartitionTable(), IoRegisterPlugPlayNotification(), IoSetPartitionInformationEx(), IoSynchronousInvalidateDeviceRelations(), IoUnregisterPlugPlayNotification(), IoVerifyPartitionTable(), IoWMIQueryAllData(), IoWritePartitionTableEx(), IrpStub(), IsaFdoPnp(), IsaFdoQueryInterface(), KbdHid_InternalDeviceControl(), KspEnableEvent(), KspPinPropertyHandler(), map_query_acl_error(), MmAddVerifierThunks(), MmArchInitialize(), MmIsVerifierEnabled(), MmPapFreePhysicalPages(), ModifyBootStoreEntry(), MouHid_InternalDeviceControl(), MountMgrNotifyNameChange(), NdisIDeviceIoControl(), nfs41_CreateVNetRoot(), nfs41_FinalizeNetRoot(), nfs41_FinalizeVNetRoot(), nfs41_IsLockRealizable(), nfs41_QueryDirectory(), nfs41_QueryFileInformation(), nfs41_QuerySecurityInformation(), nfs41_QueryVolumeInformation(), nfs41_SetSecurityInformation(), NpCommonFileSystemControl(), NpCommonQueryVolumeInformation(), NtfsQueryVolumeInformation(), NtfsSetVolumeInformation(), NtQuerySection(), OpenBootStore_UStr(), OpenBootStoreByHandle(), OpenIniBootLoaderStore(), ParseArcName(), ParseOffloadTask(), PartitionHandlePnp(), PartitionHandleQueryId(), PciDispatchIrp(), PciFdoIrpCancelRemoveDevice(), PciFdoIrpCancelStopDevice(), PciFdoIrpDeviceUsageNotification(), PciFdoIrpQueryDeviceRelations(), PciFdoIrpQueryInterface(), PciFdoIrpQueryLegacyBusInformation(), PciFdoIrpQueryPower(), PciFdoIrpQueryRemoveDevice(), PciFdoIrpQueryStopDevice(), PciFdoIrpRemoveDevice(), PciFdoIrpStartDevice(), PciFdoIrpStopDevice(), PciFdoIrpSurpriseRemoval(), PciFdoSetPowerState(), PciFdoWaitWake(), PciGetConfigHandlers(), PciGetDeviceCapabilities(), PciIdeXForwardOrIgnore(), PciIdeXPdoQueryDeviceText(), PciIdeXPdoQueryId(), PciIrpNotSupported(), PciPdoIrpCancelRemoveDevice(), PciPdoIrpCancelStopDevice(), PciPdoIrpDeviceUsageNotification(), PciPdoIrpQueryDeviceRelations(), PciPdoIrpQueryDeviceState(), PciPdoIrpQueryInterface(), PciPdoIrpQueryLegacyBusInformation(), PciPdoIrpQueryPower(), PciPdoIrpQueryRemoveDevice(), PciPdoIrpQueryStopDevice(), PciPdoIrpReadConfig(), PciPdoIrpRemoveDevice(), PciPdoIrpStopDevice(), PciPdoIrpSurpriseRemoval(), PciPdoIrpWriteConfig(), PciPdoSetPowerState(), PciPdoWaitWake(), PciQueryDeviceText(), PciQueryForPciBusInterface(), PciQueryId(), PciQueryInterface(), PcmciaDeviceControl(), PcmciaFdoPlugPlay(), PcmciaPdoPlugPlay(), PcmciaPower(), PcNewPort(), PdoQueryInterface(), PinWaveCyclicAllocatorFraming(), PinWaveCyclicAudioPosition(), PinWaveCyclicDataFormat(), PinWaveCyclicState(), PinWavePciAllocatorFraming(), PinWavePciAudioPosition(), PinWavePciDataFormat(), PinWavePciState(), FxPkgPnp::PnpDeviceUsageNotification(), FxPkgPdo::PnpEventEjectHardwareOverload(), FxPkgPnp::PnpEventQueryRemoveAskDriver(), FxPkgPnp::PnpEventQueryStopAskDriver(), FxPkgFdo::PnpFilterResourceRequirements(), PnpPassThroughQI(), PnpPassThroughQIWorker(), FxPkgFdo::PnpQueryDeviceRelations(), FxPkgPdo::PnpQueryDeviceRelations(), FxPkgPnp::PnpReleaseHardware(), PoRequestPowerIrp(), PortFdoPnp(), PortFdoScsi(), FxPkgPnp::PowerPolicyDisarmWakeFromSx(), FxChildList::ProcessBusRelations(), ProcessorPnp(), QueryBootStoreEntry(), QueryBootStoreOptions(), QueryBusInterface(), FxPkgPnp::QueryForD3ColdInterface(), QueueThread(), rdpdr_process_irp(), _FX_DRIVER_TRACKER_CACHE_AWARE::Register(), RenderInitializeUrbAndIrp(), RequestDispatchToSequentialQueue(), RequestedPowerIrpHandler(), RequestHandleQueryPropertyDeviceUniqueId(), RequestHandleQueryPropertyWriteCache(), RequestMcnSyncIrpCompletion(), ResolveArcNameManually(), RtlpWorkSpaceSizeLZNT1(), run_error_tests(), SamrConnect5(), ScratchBuffer_ResetItems(), ScreenWrite(), ScsiPortDeviceControl(), send_disks_pnp_message(), SendDeviceUsageNotificationWorker(), SerenumPdoPnp(), SerenumPdoQueryId(), SetBootStoreOptions(), StreamClassPnp(), StreamClassReadWriteConfig(), SubmitTransferPacket(), SwDispatchPnp(), test_query_process_io(), test_rng(), TestDirectoryControl(), TestIrpHandler(), TestMessageHandler(), TestQueryInformation(), TestSetInformation(), USBCCGP_CreateClose(), USBCCGP_CustomEnumWithInterface(), USBCCGP_EnumWithAssociationDescriptor(), USBCCGP_QueryInterface(), USBD_CreateDevice(), USBD_GetDeviceInformation(), USBD_InitializeDevice(), USBD_MakePdoName(), USBD_QueryBusTime(), USBD_RegisterHostController(), USBD_RemoveDevice(), USBD_RestoreDevice(), USBDI_QueryBusInformation(), USBH_CheckDeviceLanguage(), USBH_PdoDispatch(), USBH_PdoInternalControl(), USBH_PdoQueryDeviceText(), USBH_QueryCapabilities(), USBHI_GetControllerInformation(), USBHI_GetExtendedHubInformation(), USBHI_QueryDeviceInformation(), USBHUB_GetBusInterface(), USBHUB_GetBusInterfaceUSBDI(), USBPORT_IsCompanionController(), USBPORT_PdoPower(), USBPORT_QueryCapabilities(), USBPORT_QueryPciBusInterface(), USBPORT_USBDStatusToNtStatus(), USBSTOR_CreatePDO(), USBSTOR_FdoHandleStartDevice(), USBSTOR_GetBusInterface(), USBSTOR_HandleDeviceControl(), USBSTOR_HandleInternalDeviceControl(), USBSTOR_PdoHandlePnp(), User32CallHookProcFromKernel(), VfatQueryVolumeInformation(), VfatSetInformation(), VfatSetVolumeInformation(), WdmAudControlOpen(), WdmAudControlOpenMidi(), WdmAudControlOpenWave(), xHalEndMirroring(), xHalInitPnpDriver(), xHalInitPowerManagement(), xHalMirrorPhysicalMemory(), xHalQueryBusSlots(), xHalRegisterBusHandler(), and xHalStartMirroring().

◆ String

_Must_inspect_result_ __in WDFDRIVER __in WDFSTRING String
Initial value:
{
#define DDI_ENTRY()
Definition: fxglobalskm.h:56

Definition at line 391 of file fxdriverapi.cpp.

◆ validFlags

◆ VersionAvailableParams

Initial value:
{
#define DDI_ENTRY()
Definition: fxglobalskm.h:56

Definition at line 466 of file fxdriverapi.cpp.