ReactOS  0.4.15-dev-2344-g8ddbfde
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 
42 Routine Description:
43  Constructs an FxRequestContext and initialized the m_RequestType field
44 
45 Arguments:
46  Type - The type of this request.
47 
48 
49 
50 
51 
52 Return Value:
53  None.
54 
55  --*/
56 {
58 }
IFxMemory * m_RequestMemory
VOID __inline InitCompletionParams(VOID)
Type
Definition: Type.h:6
FX_REQUEST_CONTEXT_TYPE m_RequestType
#define NULL
Definition: types.h:112

◆ ~FxRequestContext()

FxRequestContext::~FxRequestContext ( VOID  )
virtual

Definition at line 60 of file fxrequestcontext.cpp.

73 {
75 }
IFxMemory * m_RequestMemory
#define ASSERT(a)
Definition: mode.c:45
#define NULL
Definition: types.h:112

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
#define ASSERT(a)
Definition: mode.c:45
_Must_inspect_result_ _In_ WDFDEVICE _In_ BOOLEAN _In_opt_ PVOID Tag
Definition: wdfdevice.h:4061
#define NULL
Definition: types.h:112

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

◆ CopyParameters()

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

Reimplemented in FxUsbDeviceStringContext, FxIoContext, FxUsbDeviceControlContext, FxUsbRequestContext, and FxUsbPipeTransferContext.

Definition at line 98 of file fxrequestcontext.hpp.

101  {
103  }
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
_In_ WDFREQUEST Request
Definition: wdfdevice.h:547

Referenced by FxRequestBase::CompleteSubmitted(), and FxUsbRequestContext::CopyParameters().

◆ Dispose()

virtual VOID FxRequestContext::Dispose ( VOID  )
inlinevirtual

◆ FormatOtherParams()

VOID FxRequestContext::FormatOtherParams ( __in FxInternalIoctlParams InternalIoctlParams)

Definition at line 187 of file fxrequestcontext.cpp.

190 {
195 }
struct _WDF_REQUEST_COMPLETION_PARAMS::@3671::@3675 Others
FxInternalIoctlParams InternalIoctlParams
WDF_REQUEST_COMPLETION_PARAMS m_CompletionParams
union _WDF_REQUEST_COMPLETION_PARAMS::@3671 Parameters

◆ 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::@3671::@3673 Read
_Must_inspect_result_ _In_ WDFUSBPIPE _In_ WDFREQUEST _In_opt_ WDFMEMORY ReadMemory
Definition: wdfusb.h:1996
WDF_REQUEST_COMPLETION_PARAMS m_CompletionParams
#define NULL
Definition: types.h:112
union _WDF_REQUEST_COMPLETION_PARAMS::@3671 Parameters

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::@3671::@3672 Write
size_t BufferOffset
Definition: wdfmemory.h:65
WDF_REQUEST_COMPLETION_PARAMS m_CompletionParams
#define NULL
Definition: types.h:112
_Must_inspect_result_ _In_ WDFUSBPIPE _In_ WDFREQUEST _In_opt_ WDFMEMORY WriteMemory
Definition: wdfusb.h:1914
union _WDF_REQUEST_COMPLETION_PARAMS::@3671 Parameters

Referenced by FxIoTargetFormatIo().

◆ InitCompletionParams()

VOID __inline FxRequestContext::InitCompletionParams ( VOID  )
inlineprotected

Definition at line 133 of file fxrequestcontext.hpp.

136  {
139  }
FORCEINLINE VOID WDF_REQUEST_COMPLETION_PARAMS_INIT(_Out_ PWDF_REQUEST_COMPLETION_PARAMS Params)
Definition: wdfrequest.h:288
WDF_REQUEST_COMPLETION_PARAMS m_CompletionParams

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  }
Type
Definition: Type.h:6
FX_REQUEST_CONTEXT_TYPE m_RequestType

◆ ReleaseAndRestore()

VOID FxRequestContext::ReleaseAndRestore ( __in FxRequestBase Request)
virtual

◆ 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: