39 m_DriverObject(ArgDriverObject),
40 m_CallbackMutexLock(FxDriverGlobals)
49#if (FX_CORE_MODE == FX_CORE_KERNEL_MODE)
74 m_DriverParametersKey =
NULL;
84 "FxDriver 0x%p not disposed: this maybe a driver reference count "
109 if (m_DriverParametersKey !=
NULL) {
113 "Cannot close Driver Parameters key %!STATUS!",
116 m_DriverParametersKey =
NULL;
123 ClearDriverObjectFxDriver();
155 "Unloading WDFDRIVER %p, PDRIVER_OBJECT_UM %p",
163 "Driver unload routine Exit WDFDRIVER %p, PDRIVER_OBJECT_UM %p",
200 sizeof(FxDriverGlobals->Public.DriverName) );
230 regLen = pEnd -
pCur;
236 for (
i = 0;
i < regLen;
i++) {
237 FxDriverGlobals->Public.DriverName[
i] = (
CHAR)
pCur[
i];
243#if FX_CORE_MODE==FX_CORE_KERNEL_MODE
245 sizeof(FxDriverGlobals->Public.DriverName),
250 sizeof(FxDriverGlobals->Public.DriverName),
292 pBegin = &FxDriverGlobals->Public.DriverName[0];
299 if ((pBegin[0] ==
'w' || pBegin[0] ==
'W') &&
300 (pBegin[1] ==
'd' || pBegin[1] ==
'D') &&
301 (pBegin[2] ==
'f' || pBegin[2] ==
'F')) {
312 FxDriverGlobals->Tag =
FX_TAG;
328 FxDriverGlobals->Public.DriverTag = FxDriverGlobals->Tag;
384 if (ArgRegistryPath !=
NULL) {
396 ArgRegistryPath->Buffer,
397 ArgRegistryPath->Length);
471#if ((FX_CORE_MODE)==(FX_CORE_KERNEL_MODE))
495#if ((FX_CORE_MODE)==(FX_CORE_KERNEL_MODE))
515 "Driver Object %p, reg path %wZ cannot be "
516 "unloaded, no DriverUnload routine specified",
524 status = OpenParametersKey();
528 "Cannot open Driver Parameters key %!STATUS!",
584 BOOLEAN automaticLockingRequired;
586 automaticLockingRequired =
FALSE;
631 automaticLockingRequired =
TRUE;
649 if (automaticLockingRequired) {
ACPI_SIZE strlen(const char *String)
virtual void Initialize(FxObject *ParentObject)
static FxDeviceRemLockAction __inline _RequiresRemLock(__in UCHAR MajorCode, __in UCHAR MinorCode)
static VOID DispatchWithLockUm(_In_ MdDeviceObject DeviceObject, _In_ MdIrp Irp, _In_opt_ IUnknown *Context)
static _Must_inspect_result_ NTSTATUS STDCALL DispatchWithLock(__in MdDeviceObject DeviceObject, __in MdIrp OriginalIrp)
static VOID DispatchUm(_In_ MdDeviceObject DeviceObject, _In_ MdIrp Irp, _In_opt_ IUnknown *Context)
static _Must_inspect_result_ NTSTATUS STDCALL Dispatch(__in MdDeviceObject DeviceObject, __in MdIrp OriginalIrp)
static NTSTATUS _Create(PFX_DRIVER_GLOBALS FxDriverGlobals, PVOID WdmObject, FxDisposeList **pObject)
PFN_WDF_DRIVER_DEVICE_ADD Method
PFN_WDF_DRIVER_UNLOAD Method
void Invoke(__in WDFDRIVER Driver)
VOID ConfigureConstraints(__in_opt PWDF_OBJECT_ATTRIBUTES DriverAttributes)
virtual VOID DeleteObject(VOID)
static VOID _InitializeTag(__in PFX_DRIVER_GLOBALS Globals, __in PWDF_DRIVER_CONFIG Config)
BOOLEAN m_DebuggerConnected
static VOID _InitializeDriverName(__in PFX_DRIVER_GLOBALS Globals, __in PCUNICODE_STRING RegistryPath)
_Must_inspect_result_ NTSTATUS AllocateDriverObjectExtensionAndStoreFxDriver(VOID)
static MdDriverAddDeviceType AddDevice
FxDriver(__in MdDriverObject DriverObject, __in PWDF_DRIVER_CONFIG DriverConfig, __in PFX_DRIVER_GLOBALS FxDriverGlobals)
FxDisposeList * m_DisposeList
FxObject * m_CallbackLockObjectPtr
FxCallbackMutexLock m_CallbackMutexLock
FxCallbackLock * m_CallbackLockPtr
_Must_inspect_result_ FxString * GetRegistryPath(VOID)
FxDriverDeviceAdd m_DriverDeviceAdd
__inline WDFDRIVER GetHandle(VOID)
static FxDriver * GetFxDriver(__in MdDriverObject DriverObject)
MxDriverObject m_DriverObject
virtual BOOLEAN Dispose(VOID)
WDF_EXECUTION_LEVEL m_ExecutionLevel
_Must_inspect_result_ NTSTATUS Initialize(__in PCUNICODE_STRING RegistryPath, __in PWDF_DRIVER_CONFIG Config, __in_opt PWDF_OBJECT_ATTRIBUTES DriverAttributes)
FxDriverUnload m_DriverUnload
WDF_SYNCHRONIZATION_SCOPE m_SynchronizationScope
WDF_DRIVER_CONFIG m_Config
static MdDriverUnloadType Unload
UNICODE_STRING m_RegistryPath
void SetCallbackLockPtr(FxCallbackLock *Lock)
virtual VOID DeleteObject(VOID)
PVOID __inline GetObjectHandleUnchecked(VOID)
__inline PFX_DRIVER_GLOBALS GetDriverGlobals(VOID)
VOID MarkNoDeleteDDI(__in FxObjectLockState State=ObjectLock)
virtual BOOLEAN Dispose(VOID)
virtual ULONG Release(__in_opt PVOID Tag=NULL, __in LONG Line=0, __in_opt PSTR File=NULL)
VOID MarkPassiveCallbacks(__in FxObjectLockState State=ObjectLock)
VOID MarkDisposeOverride(__in FxObjectLockState State=ObjectLock)
_Must_inspect_result_ NTSTATUS Assign(__in PCWSTR SourceString)
VOID SetDriverUnload(_In_ MdDriverUnload Value)
VOID SetDriverExtensionAddDevice(_In_ MdDriverAddDevice Value)
__inline MdDriverObject GetObject(VOID)
VOID SetMajorFunction(_In_ UCHAR i, _In_ MdDriverDispatch Value)
#define NT_SUCCESS(StatCode)
NTSTATUS WinErrorToNtStatus(__in ULONG WinError)
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGPNP, "Enter, WDFDEVICE %p", Device)
PFX_DRIVER_GLOBALS pFxDriverGlobals
@ FxDeviceRemLockNotRequired
VOID FxDestroy(__in PFX_DRIVER_GLOBALS FxDriverGlobals)
void FxPoolFree(__in_xcount(ptr is at an offset from AllocationStart) PVOID ptr)
#define FxVerifierBugCheck(FxDriverGlobals, Error,...)
GLuint GLsizei GLsizei * length
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define _Must_inspect_result_
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define UNREFERENCED_PARAMETER(P)
NTSTRSAFEAPI RtlStringCbCopyA(_Out_writes_bytes_(cbDest) _Always_(_Post_z_) NTSTRSAFE_PSTR pszDest, _In_ size_t cbDest, _In_ NTSTRSAFE_PCSTR pszSrc)
#define TRACE_LEVEL_VERBOSE
#define TRACE_LEVEL_FATAL
#define TRACE_LEVEL_ERROR
#define TRACE_LEVEL_INFORMATION
STRSAFEAPI StringCbCopyA(STRSAFE_LPSTR pszDest, size_t cbDest, STRSAFE_LPCSTR pszSrc)
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
#define STATUS_UNSUCCESSFUL
#define STATUS_INSUFFICIENT_RESOURCES
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_CHILD_LIST_CONFIG Config
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING _In_opt_ PWDF_OBJECT_ATTRIBUTES DriverAttributes
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING RegistryPath
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING _In_opt_ PWDF_OBJECT_ATTRIBUTES _In_ PWDF_DRIVER_CONFIG DriverConfig
@ WdfDriverInitNonPnpDriver
@ WdfDriverInitNoDispatchOverride
_Must_inspect_result_ _In_ PDRIVER_OBJECT DriverObject
FORCEINLINE VOID WDF_DRIVER_CONFIG_INIT(_Out_ PWDF_DRIVER_CONFIG Config, _In_opt_ PFN_WDF_DRIVER_DEVICE_ADD EvtDriverDeviceAdd)
#define WDF_DRIVER_GLOBALS_NAME_LEN
@ WdfSynchronizationScopeInheritFromParent
@ WdfSynchronizationScopeQueue
@ WdfSynchronizationScopeNone
@ WdfSynchronizationScopeDevice
@ WdfExecutionLevelPassive
@ WdfExecutionLevelDispatch
@ WdfExecutionLevelInheritFromParent
#define WDF_NO_OBJECT_ATTRIBUTES
#define HRESULT_FACILITY(hr)
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList
#define IRP_MN_REMOVE_DEVICE
#define IRP_MJ_MAXIMUM_FUNCTION
#define KD_DEBUGGER_ENABLED
#define KD_DEBUGGER_NOT_PRESENT