ReactOS 0.4.16-dev-334-g4d9f67c
FxRequestContext Struct Reference

#include <fxrequestcontext.hpp>

Inheritance diagram for FxRequestContext:
Collaboration diagram for FxRequestContext:

Public Member Functions

 FxRequestContext (__in FX_REQUEST_CONTEXT_TYPE Type)
 
virtual ~FxRequestContext (VOID)
 
virtual VOID Dispose (VOID)
 
virtual VOID StoreAndReferenceMemory (__in FxRequestBuffer *Buffer)
 
virtual VOID ReleaseAndRestore (__in FxRequestBase *Request)
 
__inline BOOLEAN IsType (__in FX_REQUEST_CONTEXT_TYPE Type)
 
virtual VOID CopyParameters (__in FxRequestBase *Request)
 
VOID FormatWriteParams (__in_opt IFxMemory *WriteMemory, __in_opt PWDFMEMORY_OFFSET WriteOffsets)
 
VOID FormatReadParams (__in_opt IFxMemory *ReadMemory, __in_opt PWDFMEMORY_OFFSET ReadOffsets)
 
VOID FormatOtherParams (__in FxInternalIoctlParams *InternalIoctlParams)
 
- 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)
 

Public Attributes

WDF_REQUEST_COMPLETION_PARAMS m_CompletionParams
 
IFxMemorym_RequestMemory
 
FX_REQUEST_CONTEXT_TYPE m_RequestType
 

Protected Member Functions

VOID __inline InitCompletionParams (VOID)
 
- Protected Member Functions inherited from FxStump
 FxStump (VOID)
 

Static Protected Member Functions

static VOID _StoreAndReferenceMemoryWorker (__in PVOID Tag, __deref_out_opt IFxMemory **PPMemory, __in FxRequestBuffer *Buffer)
 

Detailed Description

Definition at line 57 of file fxrequestcontext.hpp.

Constructor & Destructor Documentation

◆ FxRequestContext()

FxRequestContext::FxRequestContext ( __in FX_REQUEST_CONTEXT_TYPE  Type)

Definition at line 34 of file fxrequestcontext.cpp.

36 :
39
40/*++
41
42Routine Description:
43 Constructs an FxRequestContext and initialized the m_RequestType field
44
45Arguments:
46 Type - The type of this request.
47
48
49
50
51
52Return Value:
53 None.
54
55 --*/
56{
58}
Type
Definition: Type.h:7
#define NULL
Definition: types.h:112
FX_REQUEST_CONTEXT_TYPE m_RequestType
IFxMemory * m_RequestMemory
VOID __inline InitCompletionParams(VOID)

◆ ~FxRequestContext()

FxRequestContext::~FxRequestContext ( VOID  )
virtual

Definition at line 60 of file fxrequestcontext.cpp.

73{
75}
#define ASSERT(a)
Definition: mode.c:44

Member Function Documentation

◆ _StoreAndReferenceMemoryWorker()

VOID FxRequestContext::_StoreAndReferenceMemoryWorker ( __in PVOID  Tag,
__deref_out_opt IFxMemory **  PPMemory,
__in FxRequestBuffer Buffer 
)
staticprotected

Definition at line 120 of file fxrequestcontext.cpp.

125{
126 ASSERT(*PPMemory == NULL);
127
128 switch (Buffer->DataType) {
130 Buffer->u.Memory.Memory->ADDREF(Tag);
131 *PPMemory = Buffer->u.Memory.Memory;
132 break;
133
135 Buffer->u.RefMdl.Memory->ADDREF(Tag);
136 *PPMemory = Buffer->u.RefMdl.Memory;
137 break;
138
139 default:
140 *PPMemory = NULL;
141 }
142}
Definition: bufpool.h:45
@ FxRequestBufferMemory
@ FxRequestBufferReferencedMdl
_Must_inspect_result_ _In_ WDFDEVICE _In_ BOOLEAN _In_opt_ PVOID Tag
Definition: wdfdevice.h:4065

Referenced by StoreAndReferenceMemory(), FxInternalIoctlOthersContext::StoreAndReferenceOtherMemories(), and FxIoContext::StoreAndReferenceOtherMemory().

◆ CopyParameters()

virtual VOID FxRequestContext::CopyParameters ( __in FxRequestBase Request)
inlinevirtual

◆ Dispose()

virtual VOID FxRequestContext::Dispose ( VOID  )
inlinevirtual

◆ FormatOtherParams()

VOID FxRequestContext::FormatOtherParams ( __in FxInternalIoctlParams InternalIoctlParams)

Definition at line 187 of file fxrequestcontext.cpp.

190{
195}
FxInternalIoctlParams InternalIoctlParams
WDF_REQUEST_COMPLETION_PARAMS m_CompletionParams
union _WDF_REQUEST_COMPLETION_PARAMS::@3889 Parameters
struct _WDF_REQUEST_COMPLETION_PARAMS::@3889::@3893 Others
@ WdfRequestTypeOther
Definition: wdfdevice.h:531

◆ FormatReadParams()

VOID FxRequestContext::FormatReadParams ( __in_opt IFxMemory ReadMemory,
__in_opt PWDFMEMORY_OFFSET  ReadOffsets 
)

Definition at line 166 of file fxrequestcontext.cpp.

170{
172
173 if (ReadMemory != NULL) {
174 m_CompletionParams.Parameters.Read.Buffer = ReadMemory->GetHandle();
175 }
176
177 if (ReadOffsets != NULL) {
180 }
181 else {
183 }
184}
_Must_inspect_result_ __in WDFUSBPIPE __in WDFREQUEST __in_opt WDFMEMORY __in_opt PWDFMEMORY_OFFSET ReadOffsets
size_t BufferOffset
Definition: wdfmemory.h:65
struct _WDF_REQUEST_COMPLETION_PARAMS::@3889::@3891 Read
@ WdfRequestTypeRead
Definition: wdfdevice.h:506
_Must_inspect_result_ _In_ WDFUSBPIPE _In_ WDFREQUEST _In_opt_ WDFMEMORY ReadMemory
Definition: wdfusb.h:2000

Referenced by FxIoTargetFormatIo().

◆ FormatWriteParams()

VOID FxRequestContext::FormatWriteParams ( __in_opt IFxMemory WriteMemory,
__in_opt PWDFMEMORY_OFFSET  WriteOffsets 
)

Definition at line 145 of file fxrequestcontext.cpp.

149{
151
152 if (WriteMemory != NULL) {
153 m_CompletionParams.Parameters.Write.Buffer = WriteMemory->GetHandle();
154 }
155
156 if (WriteOffsets != NULL) {
159 }
160 else {
162 }
163}
_Must_inspect_result_ __in WDFUSBPIPE __in WDFREQUEST __in_opt WDFMEMORY __in_opt PWDFMEMORY_OFFSET WriteOffsets
struct _WDF_REQUEST_COMPLETION_PARAMS::@3889::@3890 Write
@ WdfRequestTypeWrite
Definition: wdfdevice.h:507
_Must_inspect_result_ _In_ WDFUSBPIPE _In_ WDFREQUEST _In_opt_ WDFMEMORY WriteMemory
Definition: wdfusb.h:1918

Referenced by FxIoTargetFormatIo().

◆ InitCompletionParams()

VOID __inline FxRequestContext::InitCompletionParams ( VOID  )
inlineprotected

Definition at line 133 of file fxrequestcontext.hpp.

136 {
139 }
@ WdfRequestTypeNoFormat
Definition: wdfdevice.h:533
FORCEINLINE VOID WDF_REQUEST_COMPLETION_PARAMS_INIT(_Out_ PWDF_REQUEST_COMPLETION_PARAMS Params)
Definition: wdfrequest.h:288

Referenced by FxRequestContext(), and ReleaseAndRestore().

◆ IsType()

__inline BOOLEAN FxRequestContext::IsType ( __in FX_REQUEST_CONTEXT_TYPE  Type)
inline

Definition at line 89 of file fxrequestcontext.hpp.

92 {
93 return m_RequestType == Type;
94 }

◆ ReleaseAndRestore()

◆ StoreAndReferenceMemory()

Member Data Documentation

◆ m_CompletionParams

◆ m_RequestMemory

◆ m_RequestType

FX_REQUEST_CONTEXT_TYPE FxRequestContext::m_RequestType

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