ReactOS 0.4.16-dev-1946-g52006dd
fxqueryinterfaceapi.cpp File Reference
#include "fxsupportpch.hpp"
Include dependency graph for fxqueryinterfaceapi.cpp:

Go to the source code of this file.

Macros

#define RtlSizeTToULong   RtlULongPtrToULong
 

Functions

_Must_inspect_result_ __drv_maxIRQL (PASSIVE_LEVEL) NTSTATUS NTAPI 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__
 

Macro Definition Documentation

◆ RtlSizeTToULong

#define RtlSizeTToULong   RtlULongPtrToULong

Definition at line 29 of file fxqueryinterfaceapi.cpp.

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 68 of file fxqueryinterfaceapi.cpp.

68 {
69 return status;
70 }
NTSTATUS status

◆ if() [2/7]

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

Definition at line 129 of file fxqueryinterfaceapi.cpp.

130 {
132
135 "WDFDEVICE %p, ImportInterface is TRUE and "
136 "EvtDeviceProcessQueryInterfaceRequest is NULL, %!STATUS!",
137 Device, status);
138
139 goto Done;
140 }
#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 89 of file fxqueryinterfaceapi.cpp.

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

◆ if() [4/7]

Definition at line 74 of file fxqueryinterfaceapi.cpp.

74 {
76
79 "WDFDEVICE %p, WDF_QUERY_INTERFACE_CONFIG Size %d, expected %d, "
80 "%!STATUS!", Device, InterfaceConfig->Size,
82
83 goto Done;
84 }
#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 142 of file fxqueryinterfaceapi.cpp.

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

◆ if() [6/7]

if ( pInterface  = NULL)

Definition at line 105 of file fxqueryinterfaceapi.cpp.

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

◆ if() [7/7]

if ( pQueryInterface  = NULL)

Definition at line 166 of file fxqueryinterfaceapi.cpp.

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

Variable Documentation

◆ __pad0__

Done __pad0__

Definition at line 212 of file fxqueryinterfaceapi.cpp.

◆ Device

Definition at line 44 of file fxqueryinterfaceapi.cpp.

◆ InterfaceConfig

◆ pDevice

FxDevice* pDevice

Definition at line 51 of file fxqueryinterfaceapi.cpp.

◆ pInterface

◆ pQueryInterface

pQueryInterface = NULL

Definition at line 50 of file fxqueryinterfaceapi.cpp.

◆ status