ReactOS 0.4.15-dev-7897-g78dc504
FxQueryInterface Struct Reference

#include <fxqueryinterface.hpp>

Inheritance diagram for FxQueryInterface:
Collaboration diagram for FxQueryInterface:

Public Member Functions

 FxQueryInterface (__in CfxDevice *Device, __in PWDF_QUERY_INTERFACE_CONFIG Config)
 
 ~FxQueryInterface (VOID)
 
VOID SetEmbedded (__in PWDF_QUERY_INTERFACE_CONFIG Config, __in PINTERFACE Interface)
 
- Public Member Functions inherited from FxStump
PVOID operator new (__in size_t Size, __in PFX_DRIVER_GLOBALS FxDriverGlobals)
 
PVOID operator new (__in size_t Size, __in PFX_DRIVER_GLOBALS FxDriverGlobals, __in POOL_TYPE PoolType)
 
VOID operator delete (__in PVOID pointer)
 
PVOID operator new[] (__in size_t Size, __in PFX_DRIVER_GLOBALS FxDriverGlobals)
 
VOID operator delete[] (__in PVOID pointer)
 

Static Public Member Functions

static FxQueryInterface_FromEntry (__in PSINGLE_LIST_ENTRY Entry)
 
static VOID _FormatIrp (__in PIRP Irp, __in const GUID *InterfaceGuid, __out PINTERFACE Interface, __in USHORT InterfaceSize, __in USHORT InterfaceVersion, __in_opt PVOID InterfaceSpecificData=NULL)
 
static _Must_inspect_result_ NTSTATUS _QueryForInterface (__in PDEVICE_OBJECT TopOfStack, __in const GUID *InterfaceType, __out PINTERFACE Interface, __in USHORT Size, __in USHORT Version, __in_opt PVOID InterfaceSpecificData)
 

Public Attributes

GUID m_InterfaceType
 
PINTERFACE m_Interface
 
CfxDevicem_Device
 
FxDeviceProcessQueryInterfaceRequest m_ProcessRequest
 
SINGLE_LIST_ENTRY m_Entry
 
BOOLEAN m_ImportInterface
 
BOOLEAN m_SendQueryToParentStack
 
BOOLEAN m_EmbeddedInterface
 

Additional Inherited Members

- Protected Member Functions inherited from FxStump
 FxStump (VOID)
 

Detailed Description

Definition at line 69 of file fxqueryinterface.hpp.

Constructor & Destructor Documentation

◆ FxQueryInterface()

FxQueryInterface::FxQueryInterface ( __in CfxDevice Device,
__in PWDF_QUERY_INTERFACE_CONFIG  Config 
)

Definition at line 31 of file fxqueryinterface.cpp.

34 :
37{
39
41
42 if (Config != NULL) {
43 m_SendQueryToParentStack = Config->SendQueryToParentStack;
44 m_ImportInterface = Config->ImportInterface;
45 m_ProcessRequest.m_Method = Config->EvtDeviceProcessQueryInterfaceRequest;
46 RtlCopyMemory(&m_InterfaceType, Config->InterfaceType, sizeof(GUID));
47 }
48}
PFN_WDF_DEVICE_PROCESS_QUERY_INTERFACE_REQUEST m_Method
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
BOOLEAN m_SendQueryToParentStack
FxDeviceProcessQueryInterfaceRequest m_ProcessRequest
SINGLE_LIST_ENTRY m_Entry
struct _SINGLE_LIST_ENTRY * Next
Definition: ntbasedef.h:629
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_CHILD_LIST_CONFIG Config
Definition: wdfchildlist.h:476

◆ ~FxQueryInterface()

FxQueryInterface::~FxQueryInterface ( VOID  )

Definition at line 50 of file fxqueryinterface.cpp.

51{
52 //
53 // Should not in any list
54 //
56
59 }
60}
void FxPoolFree(__in_xcount(ptr is at an offset from AllocationStart) PVOID ptr)
Definition: wdfpool.cpp:361
#define ASSERT(a)
Definition: mode.c:44

Member Function Documentation

◆ _FormatIrp()

VOID FxQueryInterface::_FormatIrp ( __in PIRP  Irp,
__in const GUID InterfaceGuid,
__out PINTERFACE  Interface,
__in USHORT  InterfaceSize,
__in USHORT  InterfaceVersion,
__in_opt PVOID  InterfaceSpecificData = NULL 
)
static

Definition at line 63 of file fxqueryinterface.cpp.

71{
73
74 Irp->IoStatus.Status = STATUS_NOT_SUPPORTED;
75
77
78 stack->MajorFunction = IRP_MJ_PNP;
79 stack->MinorFunction = IRP_MN_QUERY_INTERFACE;
80
81 stack->Parameters.QueryInterface.Interface = Interface;
82 stack->Parameters.QueryInterface.InterfaceSpecificData = InterfaceSpecificData;
83 stack->Parameters.QueryInterface.Size = InterfaceSize;
84 stack->Parameters.QueryInterface.Version = InterfaceVersion;
85 stack->Parameters.QueryInterface.InterfaceType = InterfaceGuid;
86}
#define IRP_MJ_PNP
Definition: cdrw_usr.h:52
Definition: _stack.h:55
_In_ PIRP Irp
Definition: csq.h:116
#define STATUS_NOT_SUPPORTED
Definition: ntstatus.h:423
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE Interface
Definition: wdffdo.h:465
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE _In_ USHORT _In_ USHORT _In_opt_ PVOID InterfaceSpecificData
Definition: wdffdo.h:472
static const GUID InterfaceGuid
Definition: wlanapi.c:25
__drv_aliasesMem FORCEINLINE PIO_STACK_LOCATION IoGetNextIrpStackLocation(_In_ PIRP Irp)
Definition: iofuncs.h:2695
#define IRP_MN_QUERY_INTERFACE

Referenced by _QueryForInterface(), and FxUsbDevice::InitDevice().

◆ _FromEntry()

static FxQueryInterface * FxQueryInterface::_FromEntry ( __in PSINGLE_LIST_ENTRY  Entry)
inlinestatic

Definition at line 89 of file fxqueryinterface.hpp.

92 {
94 }
base of all file and directory entries
Definition: entries.h:83
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260

Referenced by FxPkgPnp::Dispose(), and FxPkgPnp::HandleQueryInterface().

◆ _QueryForInterface()

_Must_inspect_result_ NTSTATUS FxQueryInterface::_QueryForInterface ( __in PDEVICE_OBJECT  TopOfStack,
__in const GUID InterfaceType,
__out PINTERFACE  Interface,
__in USHORT  Size,
__in USHORT  Version,
__in_opt PVOID  InterfaceSpecificData 
)
static

Definition at line 90 of file fxqueryinterface.cpp.

123{
124 PIRP pIrp;
126
127 pIrp = IoAllocateIrp(TopOfStack->StackSize, FALSE);
128
129 if (pIrp != NULL) {
131
133 pIrp,
135 Interface,
136 Size,
137 Version,
139 );
140
141 status = irp.SendIrpSynchronously(TopOfStack);
142 }
143 else {
145 }
146
147 return status;
148}
LONG NTSTATUS
Definition: precomp.h:26
CHECK_RETURN_IF_USER_MODE NTSTATUS SendIrpSynchronously(__in MdDeviceObject DeviceObject)
Definition: fxirpum.cpp:151
FxIrp * pIrp
FxIrp * irp
PIRP NTAPI IoAllocateIrp(IN CCHAR StackSize, IN BOOLEAN ChargeQuota)
Definition: irp.c:615
static VOID _FormatIrp(__in PIRP Irp, __in const GUID *InterfaceGuid, __out PINTERFACE Interface, __in USHORT InterfaceSize, __in USHORT InterfaceVersion, __in_opt PVOID InterfaceSpecificData=NULL)
Definition: ps.c:97
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4533
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID InterfaceType
Definition: wdffdo.h:463
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE _In_ USHORT _In_ USHORT Version
Definition: wdffdo.h:469

Referenced by FxDeviceBase::QueryForInterface().

◆ SetEmbedded()

VOID FxQueryInterface::SetEmbedded ( __in PWDF_QUERY_INTERFACE_CONFIG  Config,
__in PINTERFACE  Interface 
)

Definition at line 151 of file fxqueryinterface.cpp.

174{
177
178 m_SendQueryToParentStack = Config->SendQueryToParentStack;
179 m_ImportInterface = Config->ImportInterface;
180 m_ProcessRequest.m_Method = Config->EvtDeviceProcessQueryInterfaceRequest;
181 RtlCopyMemory(&m_InterfaceType, Config->InterfaceType, sizeof(GUID));
182}
#define TRUE
Definition: types.h:120

Member Data Documentation

◆ m_Device

CfxDevice* FxQueryInterface::m_Device

Definition at line 124 of file fxqueryinterface.hpp.

◆ m_EmbeddedInterface

BOOLEAN FxQueryInterface::m_EmbeddedInterface

◆ m_Entry

SINGLE_LIST_ENTRY FxQueryInterface::m_Entry

◆ m_ImportInterface

BOOLEAN FxQueryInterface::m_ImportInterface

◆ m_Interface

PINTERFACE FxQueryInterface::m_Interface

◆ m_InterfaceType

GUID FxQueryInterface::m_InterfaceType

◆ m_ProcessRequest

FxDeviceProcessQueryInterfaceRequest FxQueryInterface::m_ProcessRequest

◆ m_SendQueryToParentStack

BOOLEAN FxQueryInterface::m_SendQueryToParentStack

The documentation for this struct was generated from the following files: