ReactOS  0.4.15-dev-2701-g34593d9
wdfdriver.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _WDF_DRIVER_CONFIG
 
struct  _WDF_DRIVER_VERSION_AVAILABLE_PARAMS
 

Macros

#define WDF_EXTERN_C
 
#define WDF_EXTERN_C_START
 
#define WDF_EXTERN_C_END
 
#define WDF_TRACE_ID   ('TRAC')
 

Typedefs

typedef WDF_EXTERN_C_START enum _WDF_DRIVER_INIT_FLAGS WDF_DRIVER_INIT_FLAGS
 
typedef _Inout_ PWDFDEVICE_INIT DeviceInit
 
typedef EVT_WDF_DRIVER_DEVICE_ADD * PFN_WDF_DRIVER_DEVICE_ADD
 
typedef EVT_WDF_DRIVER_UNLOAD * PFN_WDF_DRIVER_UNLOAD
 
typedef _In_opt_ PVOID dataPath
 
typedef _In_opt_ PVOID _In_ ULONG bufferLength
 
typedef _In_opt_ PVOID _In_ ULONG _Inout_updates_bytes_(bufferLength) PVOID buffer
 
typedef _In_opt_ PVOID _In_ ULONG _In_ PVOID context
 
typedef _In_opt_ PVOID _In_ ULONG _In_ PVOID _Out_ PULONG size
 
typedef EVT_WDF_TRACE_CALLBACK * PFN_WDF_TRACE_CALLBACK
 
typedef struct _WDF_DRIVER_CONFIG WDF_DRIVER_CONFIG
 
typedef struct _WDF_DRIVER_CONFIGPWDF_DRIVER_CONFIG
 
typedef struct _WDF_DRIVER_VERSION_AVAILABLE_PARAMS WDF_DRIVER_VERSION_AVAILABLE_PARAMS
 
typedef struct _WDF_DRIVER_VERSION_AVAILABLE_PARAMSPWDF_DRIVER_VERSION_AVAILABLE_PARAMS
 
typedef _Must_inspect_result_ _IRQL_requires_max_(PASSIVE_LEVEL) WDFAPI NTSTATUS(STDCALL *PFN_WDFDRIVERCREATE) (_In_ PWDF_DRIVER_GLOBALS DriverGlobals
 
typedef _Must_inspect_result_ _In_ PDRIVER_OBJECT DriverObject
 
typedef _Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING RegistryPath
 
typedef _Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING _In_opt_ PWDF_OBJECT_ATTRIBUTES DriverAttributes
 
typedef _Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING _In_opt_ PWDF_OBJECT_ATTRIBUTES _In_ PWDF_DRIVER_CONFIG DriverConfig
 
typedef _Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING _In_opt_ PWDF_OBJECT_ATTRIBUTES _In_ PWDF_DRIVER_CONFIG _Out_opt_ WDFDRIVER * Driver
 
typedef _Must_inspect_result_ _In_ WDFDRIVER _In_ ACCESS_MASK DesiredAccess
 
typedef _Must_inspect_result_ _In_ WDFDRIVER _In_ ACCESS_MASK _In_opt_ PWDF_OBJECT_ATTRIBUTES KeyAttributes
 
typedef _Must_inspect_result_ _In_ WDFDRIVER _In_ ACCESS_MASK _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFKEY * Key
 
typedef _Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PFN_WDF_TRACE_CALLBACK EvtTraceCallback
 
typedef _Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PFN_WDF_TRACE_CALLBACK _In_ PVOID ControlBlock
 
typedef _Must_inspect_result_ _In_ WDFDRIVER _In_ WDFSTRING String
 
typedef _Must_inspect_result_ _In_ WDFDRIVER _In_ PWDF_DRIVER_VERSION_AVAILABLE_PARAMS VersionAvailableParams
 

Enumerations

enum  _WDF_DRIVER_INIT_FLAGS { WdfDriverInitNonPnpDriver = 0x00000001, WdfDriverInitNoDispatchOverride = 0x00000002, WdfVerifyOn = 0x00000004, WdfVerifierOn = 0x00000008 }
 

Functions

typedef _Function_class_ (EVT_WDF_DRIVER_DEVICE_ADD) _IRQL_requires_same_ _IRQL_requires_max_(PASSIVE_LEVEL) NTSTATUS STDCALL EVT_WDF_DRIVER_DEVICE_ADD(_In_ WDFDRIVER Driver
 
typedef _Function_class_ (EVT_WDF_DRIVER_UNLOAD) _IRQL_requires_same_ _IRQL_requires_max_(PASSIVE_LEVEL) VOID STDCALL EVT_WDF_DRIVER_UNLOAD(_In_ WDFDRIVER Driver)
 
typedef _Function_class_ (EVT_WDF_TRACE_CALLBACK) _IRQL_requires_same_ _IRQL_requires_max_(PASSIVE_LEVEL) NTSTATUS STDCALL EVT_WDF_TRACE_CALLBACK(_In_ UCHAR minorFunction
 
FORCEINLINE VOID WDF_DRIVER_CONFIG_INIT (_Out_ PWDF_DRIVER_CONFIG Config, _In_opt_ PFN_WDF_DRIVER_DEVICE_ADD EvtDriverDeviceAdd)
 
FORCEINLINE VOID WDF_DRIVER_VERSION_AVAILABLE_PARAMS_INIT (_Out_ PWDF_DRIVER_VERSION_AVAILABLE_PARAMS Params, _In_ ULONG MajorVersion, _In_ ULONG MinorVersion)
 
FORCEINLINE WDFDRIVER WdfGetDriver (VOID)
 
_Must_inspect_result_ _IRQL_requires_max_ (PASSIVE_LEVEL) FORCEINLINE NTSTATUS WdfDriverCreate(_In_ PDRIVER_OBJECT DriverObject
 
typedef _IRQL_requires_max_ (DISPATCH_LEVEL) WDFAPI PDRIVER_OBJECT(STDCALL *PFN_WDFDRIVERWDMGETDRIVEROBJECT)(_In_ PWDF_DRIVER_GLOBALS DriverGlobals
 

Macro Definition Documentation

◆ WDF_EXTERN_C

#define WDF_EXTERN_C

Definition at line 38 of file wdfdriver.h.

◆ WDF_EXTERN_C_END

#define WDF_EXTERN_C_END

Definition at line 40 of file wdfdriver.h.

◆ WDF_EXTERN_C_START

#define WDF_EXTERN_C_START

Definition at line 39 of file wdfdriver.h.

◆ WDF_TRACE_ID

#define WDF_TRACE_ID   ('TRAC')

Definition at line 59 of file wdfdriver.h.

Typedef Documentation

◆ _Inout_updates_bytes_

typedef _In_opt_ PVOID _In_ ULONG _Inout_updates_bytes_(bufferLength) PVOID buffer

Definition at line 110 of file wdfdriver.h.

◆ _IRQL_requires_max_

typedef _Must_inspect_result_ _IRQL_requires_max_(PASSIVE_LEVEL) WDFAPI BOOLEAN(STDCALL *PFN_WDFDRIVERISVERSIONAVAILABLE)(_In_ PWDF_DRIVER_GLOBALS DriverGlobals

Definition at line 206 of file wdfdriver.h.

◆ bufferLength

Definition at line 107 of file wdfdriver.h.

◆ context

Definition at line 113 of file wdfdriver.h.

◆ ControlBlock

Initial value:
{
#define WdfFunctions
Definition: wdf.h:66
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PFN_WDF_TRACE_CALLBACK _In_ PVOID ControlBlock
Definition: wdfdriver.h:370
_Must_inspect_result_ _In_ PDRIVER_OBJECT DriverObject
Definition: wdfdriver.h:213
PWDF_DRIVER_GLOBALS WdfDriverGlobals
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PFN_WDF_TRACE_CALLBACK EvtTraceCallback
Definition: wdfdriver.h:370

Definition at line 370 of file wdfdriver.h.

◆ dataPath

Definition at line 107 of file wdfdriver.h.

◆ DesiredAccess

◆ DeviceInit

Definition at line 76 of file wdfdriver.h.

◆ Driver

typedef _Must_inspect_result_ _In_ WDFDRIVER Driver
Initial value:
{
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING _In_opt_ PWDF_OBJECT_ATTRIBUTES _In_ PWDF_DRIVER_CONFIG _Out_opt_ WDFDRIVER * Driver
Definition: wdfdriver.h:213
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING RegistryPath
Definition: wdfdriver.h:213
#define WdfFunctions
Definition: wdf.h:66
_Must_inspect_result_ _In_ PDRIVER_OBJECT DriverObject
Definition: wdfdriver.h:213
PWDF_DRIVER_GLOBALS WdfDriverGlobals
_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 at line 213 of file wdfdriver.h.

◆ DriverAttributes

◆ DriverConfig

◆ DriverObject

Initial value:
{
#define PAGED_CODE_LOCKED()
Definition: kefuncs.h:1429

Definition at line 213 of file wdfdriver.h.

◆ EvtTraceCallback

◆ Key

Initial value:
{
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING _In_opt_ PWDF_OBJECT_ATTRIBUTES _In_ PWDF_DRIVER_CONFIG _Out_opt_ WDFDRIVER * Driver
Definition: wdfdriver.h:213
_Must_inspect_result_ _In_ WDFDRIVER _In_ ACCESS_MASK _In_opt_ PWDF_OBJECT_ATTRIBUTES KeyAttributes
Definition: wdfdriver.h:306
#define WdfFunctions
Definition: wdf.h:66
_Must_inspect_result_ _In_ WDFDRIVER _In_ ACCESS_MASK DesiredAccess
Definition: wdfdriver.h:306
PWDF_DRIVER_GLOBALS WdfDriverGlobals
_Must_inspect_result_ _In_ WDFDRIVER _In_ ACCESS_MASK _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFKEY * Key
Definition: wdfdriver.h:306

Definition at line 306 of file wdfdriver.h.

◆ KeyAttributes

◆ PFN_WDF_DRIVER_DEVICE_ADD

typedef EVT_WDF_DRIVER_DEVICE_ADD* PFN_WDF_DRIVER_DEVICE_ADD

Definition at line 78 of file wdfdriver.h.

◆ PFN_WDF_DRIVER_UNLOAD

typedef EVT_WDF_DRIVER_UNLOAD* PFN_WDF_DRIVER_UNLOAD

Definition at line 91 of file wdfdriver.h.

◆ PFN_WDF_TRACE_CALLBACK

typedef EVT_WDF_TRACE_CALLBACK* PFN_WDF_TRACE_CALLBACK

Definition at line 118 of file wdfdriver.h.

◆ PWDF_DRIVER_CONFIG

◆ PWDF_DRIVER_VERSION_AVAILABLE_PARAMS

◆ RegistryPath

◆ size

Definition at line 113 of file wdfdriver.h.

◆ String

Initial value:
{
return ((PFN_WDFDRIVERRETRIEVEVERSIONSTRING) WdfFunctions[WdfDriverRetrieveVersionStringTableIndex])(WdfDriverGlobals, Driver, String)
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING _In_opt_ PWDF_OBJECT_ATTRIBUTES _In_ PWDF_DRIVER_CONFIG _Out_opt_ WDFDRIVER * Driver
Definition: wdfdriver.h:213
#define WdfFunctions
Definition: wdf.h:66
PWDF_DRIVER_GLOBALS WdfDriverGlobals
_Must_inspect_result_ _In_ WDFDRIVER _In_ WDFSTRING String
Definition: wdfdriver.h:405

Definition at line 405 of file wdfdriver.h.

◆ VersionAvailableParams

Initial value:
{
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING _In_opt_ PWDF_OBJECT_ATTRIBUTES _In_ PWDF_DRIVER_CONFIG _Out_opt_ WDFDRIVER * Driver
Definition: wdfdriver.h:213
_Must_inspect_result_ _In_ WDFDRIVER _In_ PWDF_DRIVER_VERSION_AVAILABLE_PARAMS VersionAvailableParams
Definition: wdfdriver.h:436
#define WdfFunctions
Definition: wdf.h:66
PWDF_DRIVER_GLOBALS WdfDriverGlobals

Definition at line 436 of file wdfdriver.h.

◆ WDF_DRIVER_CONFIG

◆ WDF_DRIVER_INIT_FLAGS

◆ WDF_DRIVER_VERSION_AVAILABLE_PARAMS

Enumeration Type Documentation

◆ _WDF_DRIVER_INIT_FLAGS

Enumerator
WdfDriverInitNonPnpDriver 
WdfDriverInitNoDispatchOverride 
WdfVerifyOn 
WdfVerifierOn 

Definition at line 50 of file wdfdriver.h.

50  {
51  WdfDriverInitNonPnpDriver = 0x00000001, // If set, no Add Device routine is assigned.
52  WdfDriverInitNoDispatchOverride = 0x00000002, // Useful for miniports.
53  WdfVerifyOn = 0x00000004, // Controls whether WDFVERIFY macros are live.
54  WdfVerifierOn = 0x00000008, // Top level verififer flag.
WDF_EXTERN_C_START enum _WDF_DRIVER_INIT_FLAGS WDF_DRIVER_INIT_FLAGS

Function Documentation

◆ _Function_class_() [1/3]

typedef _Function_class_ ( EVT_WDF_DRIVER_DEVICE_ADD  )

◆ _Function_class_() [2/3]

typedef _Function_class_ ( EVT_WDF_DRIVER_UNLOAD  )

◆ _Function_class_() [3/3]

typedef _Function_class_ ( EVT_WDF_TRACE_CALLBACK  )

◆ _IRQL_requires_max_() [1/2]

_Must_inspect_result_ _IRQL_requires_max_ ( PASSIVE_LEVEL  )

Definition at line 258 of file wdfdriver.h.

265 {
266  return ((PFN_WDFDRIVERGETREGISTRYPATH) WdfFunctions[WdfDriverGetRegistryPathTableIndex])(WdfDriverGlobals, Driver);
267 }
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING _In_opt_ PWDF_OBJECT_ATTRIBUTES _In_ PWDF_DRIVER_CONFIG _Out_opt_ WDFDRIVER * Driver
Definition: wdfdriver.h:213
#define WdfFunctions
Definition: wdf.h:66
PWDF_DRIVER_GLOBALS WdfDriverGlobals

◆ _IRQL_requires_max_() [2/2]

typedef _IRQL_requires_max_ ( DISPATCH_LEVEL  )

Definition at line 283 of file wdfdriver.h.

290 {
291  return ((PFN_WDFDRIVERWDMGETDRIVEROBJECT) WdfFunctions[WdfDriverWdmGetDriverObjectTableIndex])(WdfDriverGlobals, Driver);
292 }
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING _In_opt_ PWDF_OBJECT_ATTRIBUTES _In_ PWDF_DRIVER_CONFIG _Out_opt_ WDFDRIVER * Driver
Definition: wdfdriver.h:213
#define WdfFunctions
Definition: wdf.h:66
PWDF_DRIVER_GLOBALS WdfDriverGlobals

◆ WDF_DRIVER_CONFIG_INIT()

FORCEINLINE VOID WDF_DRIVER_CONFIG_INIT ( _Out_ PWDF_DRIVER_CONFIG  Config,
_In_opt_ PFN_WDF_DRIVER_DEVICE_ADD  EvtDriverDeviceAdd 
)

Definition at line 148 of file wdfdriver.h.

152 {
154 
155  Config->Size = sizeof(WDF_DRIVER_CONFIG);
156  Config->EvtDriverDeviceAdd = EvtDriverDeviceAdd;
157 }
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_CHILD_LIST_CONFIG Config
Definition: wdfchildlist.h:474
struct _WDF_DRIVER_CONFIG WDF_DRIVER_CONFIG
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262

Referenced by DriverEntry(), and FxDriver::FxDriver().

◆ WDF_DRIVER_VERSION_AVAILABLE_PARAMS_INIT()

FORCEINLINE VOID WDF_DRIVER_VERSION_AVAILABLE_PARAMS_INIT ( _Out_ PWDF_DRIVER_VERSION_AVAILABLE_PARAMS  Params,
_In_ ULONG  MajorVersion,
_In_ ULONG  MinorVersion 
)

Definition at line 179 of file wdfdriver.h.

184 {
186 
188  Params->MajorVersion = MajorVersion;
189  Params->MinorVersion = MinorVersion;
190 }
ULONG MinorVersion
Definition: ros_glue.cpp:5
ULONG MajorVersion
Definition: ros_glue.cpp:4
_In_ WDFIOTARGET _In_ PWDF_REQUEST_COMPLETION_PARAMS Params
Definition: wdfrequest.h:306
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
struct _WDF_DRIVER_VERSION_AVAILABLE_PARAMS WDF_DRIVER_VERSION_AVAILABLE_PARAMS

◆ WdfGetDriver()

FORCEINLINE WDFDRIVER WdfGetDriver ( VOID  )

Definition at line 194 of file wdfdriver.h.

197 {
198  return WdfDriverGlobals->Driver;
199 }
PWDF_DRIVER_GLOBALS WdfDriverGlobals
WDFDRIVER Driver
Definition: wdfglobals.h:56