ReactOS 0.4.15-dev-8339-g4028de8
fxqueryinterfaceapi.cpp File Reference
#include "fxsupportpch.hpp"
Include dependency graph for fxqueryinterfaceapi.cpp:

Go to the source code of this file.

Functions

_Must_inspect_result_ __drv_maxIRQL (PASSIVE_LEVEL) NTSTATUS STDCALL WDFEXPORT(WdfDeviceAddQueryInterface)(__in PWDF_DRIVER_GLOBALS DriverGlobals
 
 FxObjectHandleGetPtrAndGlobals (GetFxDriverGlobals(DriverGlobals), Device, FX_TYPE_DEVICE,(PVOID *) &pDevice, &pFxDriverGlobals)
 
 FxPointerNotNull (pFxDriverGlobals, Device)
 
 FxPointerNotNull (pFxDriverGlobals, InterfaceConfig)
 
 FxPointerNotNull (pFxDriverGlobals, InterfaceConfig->InterfaceType)
 
 if (!NT_SUCCESS(status))
 
 if (InterfaceConfig->Size !=sizeof(WDF_QUERY_INTERFACE_CONFIG))
 
 if (InterfaceConfig->SendQueryToParentStack &&pDevice->IsPdo()==FALSE)
 
 if (pInterface==NULL)
 
 if (InterfaceConfig->ImportInterface &&InterfaceConfig->EvtDeviceProcessQueryInterfaceRequest==NULL)
 
 if (pInterface !=NULL)
 
 if (pQueryInterface==NULL)
 
pDevice m_PkgPnp AddQueryInterface (pQueryInterface, TRUE)
 

Variables

_Must_inspect_result_ __in WDFDEVICE Device
 
_Must_inspect_result_ __in WDFDEVICE __in PWDF_QUERY_INTERFACE_CONFIG InterfaceConfig
 
FxQueryInterfacepQueryInterface = NULL
 
FxDevicepDevice
 
PINTERFACE pInterface = InterfaceConfig->Interface
 
NTSTATUS status = FxVerifierCheckIrqlLevel(pFxDriverGlobals, PASSIVE_LEVEL)
 
Done __pad0__
 

Function Documentation

◆ __drv_maxIRQL()

_Must_inspect_result_ __drv_maxIRQL ( PASSIVE_LEVEL  )

◆ AddQueryInterface()

pDevice m_PkgPnp AddQueryInterface ( pQueryInterface  ,
TRUE   
)

◆ FxObjectHandleGetPtrAndGlobals()

FxObjectHandleGetPtrAndGlobals ( GetFxDriverGlobals(DriverGlobals ,
Device  ,
FX_TYPE_DEVICE  ,
(PVOID *) &  pDevice,
pFxDriverGlobals 
)

◆ FxPointerNotNull() [1/3]

FxPointerNotNull ( pFxDriverGlobals  ,
Device   
)

◆ FxPointerNotNull() [2/3]

FxPointerNotNull ( pFxDriverGlobals  ,
InterfaceConfig   
)

◆ FxPointerNotNull() [3/3]

FxPointerNotNull ( pFxDriverGlobals  ,
InterfaceConfig->  InterfaceType 
)

◆ if() [1/7]

if ( NT_SUCCESSstatus)

Definition at line 67 of file fxqueryinterfaceapi.cpp.

67 {
68 return status;
69 }
NTSTATUS status

◆ if() [2/7]

if ( InterfaceConfig->ImportInterface &&InterfaceConfig->  EvtDeviceProcessQueryInterfaceRequest = NULL)

Definition at line 128 of file fxqueryinterfaceapi.cpp.

129 {
131
134 "WDFDEVICE %p, ImportInterface is TRUE and "
135 "EvtDeviceProcessQueryInterfaceRequest is NULL, %!STATUS!",
136 Device, status);
137
138 goto Done;
139 }
#define TRACINGERROR
Definition: dbgtrace.h:63
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGPNP, "Enter, WDFDEVICE %p", Device)
PFX_DRIVER_GLOBALS pFxDriverGlobals
#define TRACE_LEVEL_ERROR
Definition: storswtr.h:27
Definition: ps.c:97
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474

◆ if() [3/7]

if ( InterfaceConfig->SendQueryToParentStack &&pDevice->  IsPdo() = FALSE)

Definition at line 88 of file fxqueryinterfaceapi.cpp.

88 {
90
93 "SendQueryToParentStack TRUE, but WDFDEVICE %p not a PDO, %!STATUS!",
94 Device, status);
95
96 goto Done;
97 }

◆ if() [4/7]

Definition at line 73 of file fxqueryinterfaceapi.cpp.

73 {
75
78 "WDFDEVICE %p, WDF_QUERY_INTERFACE_CONFIG Size %d, expected %d, "
79 "%!STATUS!", Device, InterfaceConfig->Size,
81
82 goto Done;
83 }
#define STATUS_INFO_LENGTH_MISMATCH
Definition: udferr_usr.h:133
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_QUERY_INTERFACE_CONFIG InterfaceConfig

◆ if() [5/7]

if ( pInterface = NULL)

Definition at line 141 of file fxqueryinterfaceapi.cpp.

141 {
142 //
143 // Make sure we are exposing the minimum size
144 //
145 if (pInterface->Size < sizeof(INTERFACE)) {
147
150 "WDFDEVICE %p, Interface size %d < sizeof(INTERFACE) (%d), "
151 "%!STATUS!", Device, pInterface->Size, sizeof(INTERFACE), status);
152
153 goto Done;
154 }
155 }
PINTERFACE pInterface
USHORT Size
Definition: miniport.h:121

◆ if() [6/7]

if ( pInterface  = NULL)

Definition at line 104 of file fxqueryinterfaceapi.cpp.

104 {
105 if (InterfaceConfig->SendQueryToParentStack || InterfaceConfig->ImportInterface) {
106 //
107 // A NULL interface is valid for this config
108 //
109 DO_NOTHING();
110 }
111 else {
113
116 "WDFDEVICE %p, SendQueryToParentStack is FALSE and "
117 "InterfaceConfig->ImportInterface is FALSE, %!STATUS!",
118 Device, status);
119
120 goto Done;
121 }
122 }
#define DO_NOTHING()
Definition: mxgeneral.h:32

◆ if() [7/7]

if ( pQueryInterface  = NULL)

Definition at line 165 of file fxqueryinterfaceapi.cpp.

165 {
167
170 "WDFDEVICE %p, object creation failed, %!STATUS!", Device, status);
171
172 goto Done;
173 }
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158

Variable Documentation

◆ __pad0__

Done __pad0__

Definition at line 211 of file fxqueryinterfaceapi.cpp.

◆ Device

Definition at line 43 of file fxqueryinterfaceapi.cpp.

◆ InterfaceConfig

◆ pDevice

FxDevice* pDevice

Definition at line 50 of file fxqueryinterfaceapi.cpp.

◆ pInterface

◆ pQueryInterface

pQueryInterface = NULL

Definition at line 49 of file fxqueryinterfaceapi.cpp.

◆ status