ReactOS  0.4.15-dev-3165-gdf6fff7
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 {
38  m_Entry.Next = NULL;
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
SINGLE_LIST_ENTRY m_Entry
#define FALSE
Definition: types.h:117
struct _SINGLE_LIST_ENTRY * Next
Definition: ntbasedef.h:629
FxDeviceProcessQueryInterfaceRequest m_ProcessRequest
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_CHILD_LIST_CONFIG Config
Definition: wdfchildlist.h:474
#define NULL
Definition: types.h:112
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
BOOLEAN m_SendQueryToParentStack

◆ ~FxQueryInterface()

FxQueryInterface::~FxQueryInterface ( VOID  )

Definition at line 50 of file fxqueryinterface.cpp.

51 {
52  //
53  // Should not in any list
54  //
55  ASSERT(m_Entry.Next == NULL);
56 
59  }
60 }
SINGLE_LIST_ENTRY m_Entry
#define FALSE
Definition: types.h:117
#define ASSERT(a)
Definition: mode.c:44
struct _SINGLE_LIST_ENTRY * Next
Definition: ntbasedef.h:629
#define NULL
Definition: types.h:112
void FxPoolFree(__in_xcount(ptr is at an offset from AllocationStart) PVOID ptr)
Definition: wdfpool.cpp:361

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 }
return STATUS_NOT_SUPPORTED
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE _In_ USHORT _In_ USHORT _In_opt_ PVOID InterfaceSpecificData
Definition: wdffdo.h:461
#define IRP_MJ_PNP
Definition: cdrw_usr.h:52
static stack_node_t * stack
Definition: rpn_ieee.c:37
_In_ PIRP Irp
Definition: csq.h:116
Definition: _stack.h:47
#define IRP_MN_QUERY_INTERFACE
static const GUID InterfaceGuid
Definition: wlanapi.c:25
__drv_aliasesMem FORCEINLINE PIO_STACK_LOCATION IoGetNextIrpStackLocation(_In_ PIRP Irp)
Definition: iofuncs.h:2695
IN PVOID IN PVOID IN USHORT IN USHORT IN PINTERFACE Interface
Definition: pci.h:361

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  }
SINGLE_LIST_ENTRY m_Entry
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560
base of all file and directory entries
Definition: entries.h:82

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) {
130  FxAutoIrp irp(pIrp);
131 
132  _FormatIrp(
133  pIrp,
135  Interface,
136  Size,
137  Version,
139  );
140 
141  status = irp.SendIrpSynchronously(TopOfStack);
142  }
143  else {
145  }
146 
147  return status;
148 }
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE _In_ USHORT _In_ USHORT _In_opt_ PVOID InterfaceSpecificData
Definition: wdffdo.h:461
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
LONG NTSTATUS
Definition: precomp.h:26
IN PVOID IN PVOID IN USHORT IN USHORT Size
Definition: pci.h:361
FxIrp * pIrp
#define FALSE
Definition: types.h:117
CHECK_RETURN_IF_USER_MODE NTSTATUS SendIrpSynchronously(__in MdDeviceObject DeviceObject)
Definition: fxirpum.cpp:151
IN PVOID IN PVOID IN USHORT Version
Definition: pci.h:361
IN PVOID IN PVOID IN USHORT IN USHORT IN PINTERFACE Interface
Definition: pci.h:361
#define NULL
Definition: types.h:112
static VOID _FormatIrp(__in PIRP Irp, __in const GUID *InterfaceGuid, __out PINTERFACE Interface, __in USHORT InterfaceSize, __in USHORT InterfaceVersion, __in_opt PVOID InterfaceSpecificData=NULL)
PIRP NTAPI IoAllocateIrp(IN CCHAR StackSize, IN BOOLEAN ChargeQuota)
Definition: irp.c:615
static SERVICE_STATUS status
Definition: service.c:31
FxIrp * irp
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID InterfaceType
Definition: wdffdo.h:461
Definition: ps.c:97

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 }
PFN_WDF_DEVICE_PROCESS_QUERY_INTERFACE_REQUEST m_Method
#define TRUE
Definition: types.h:120
FxDeviceProcessQueryInterfaceRequest m_ProcessRequest
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_CHILD_LIST_CONFIG Config
Definition: wdfchildlist.h:474
IN PVOID IN PVOID IN USHORT IN USHORT IN PINTERFACE Interface
Definition: pci.h:361
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
BOOLEAN m_SendQueryToParentStack

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: