ReactOS  0.4.15-dev-2993-g14fbe80
fxrequestcontext.hpp
Go to the documentation of this file.
1 /*++
2 
3 Copyright (c) Microsoft Corporation. All rights reserved.
4 
5 Module Name:
6 
7  FxRequestContext.hpp
8 
9 Abstract:
10 
11  Defines the base structure for contexts associated with FxRequest
12 
13 Author:
14 
15 
16 
17 Environment:
18 
19  Both kernel and user mode
20 
21 Revision History:
22 
23 --*/
24 
25 #ifndef _FXREQUESTCONTEXT_H_
26 #define _FXREQUESTCONTEXT_H_
27 
29 
30 //
31 // IO_STACK_LOCATION::Parameters.Others.Argument3 is taken up by the IOCTL
32 // value, so there are only 3
33 //
34 #define FX_REQUEST_NUM_OTHER_PARAMS (3)
35 
36 //
37 // Here are all the derivations off of FxRequestContext
38 //
39 // FxIoContext
40 // FxInternalIoctlOthersContext
41 // FxUsbRequestContext
42 // +FxUsbDeviceVendorContext
43 // +FxUsbDeviceStatusContext
44 // +FxUsbDeviceFeatureContext
45 // +FxUsbPipeTransferContext
46 // +FxUsbUrbContext
47 // +FxUsbPipeRequestContext
48 // +FxUsbPipeControlTransferContext
49 //
50 
51 typedef struct _FxInternalIoctlParams{
52  WDFMEMORY Argument1;
53  WDFMEMORY Argument2;
54  WDFMEMORY Argument4;
56 
57 struct FxRequestContext : public FxStump {
58 
61  );
62 
63  virtual
65  VOID
66  );
67 
68  virtual
69  VOID
71  VOID
72  )
73  {}
74 
75  virtual
76  VOID
79  );
80 
81  virtual
82  VOID
85  );
86 
87  __inline
88  BOOLEAN
91  )
92  {
93  return m_RequestType == Type;
94  }
95 
96  virtual
97  VOID
100  )
101  {
103  }
104 
105  VOID
109  );
110 
111  VOID
115  );
116 
117  VOID
120  );
121 
122 protected:
123  static
124  VOID
126  __in PVOID Tag,
127  __deref_out_opt IFxMemory** PPMemory,
129  );
130 
131  VOID
132  __inline
134  VOID
135  )
136  {
139  }
140 
141 public:
143 
144  //
145  // Memory associated with the context that will be released when the
146  // FxRequestBase has been completed by the target.
147  //
149 
150  //
151  // RTTI replacement
152  //
154 };
155 
156 #endif // _FXREQUESTCONTEXT_H_
IFxMemory * m_RequestMemory
FxRequestContext(__in FX_REQUEST_CONTEXT_TYPE Type)
_Must_inspect_result_ __in WDFUSBPIPE __in WDFREQUEST __in_opt WDFMEMORY __in_opt PWDFMEMORY_OFFSET ReadOffsets
#define __in_opt
Definition: dbghelp.h:38
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
_In_ WDFREQUEST Request
Definition: wdfdevice.h:547
_Must_inspect_result_ __in WDFUSBPIPE __in WDFREQUEST __in_opt WDFMEMORY __in_opt PWDFMEMORY_OFFSET WriteOffsets
VOID FormatWriteParams(__in_opt IFxMemory *WriteMemory, __in_opt PWDFMEMORY_OFFSET WriteOffsets)
VOID __inline InitCompletionParams(VOID)
virtual VOID ReleaseAndRestore(__in FxRequestBase *Request)
unsigned char BOOLEAN
VOID FormatReadParams(__in_opt IFxMemory *ReadMemory, __in_opt PWDFMEMORY_OFFSET ReadOffsets)
struct _FxInternalIoctlParams * pFxInternalIoctlParams
virtual ~FxRequestContext(VOID)
Definition: bufpool.h:45
VOID FormatOtherParams(__in FxInternalIoctlParams *InternalIoctlParams)
FORCEINLINE VOID WDF_REQUEST_COMPLETION_PARAMS_INIT(_Out_ PWDF_REQUEST_COMPLETION_PARAMS Params)
Definition: wdfrequest.h:288
Type
Definition: Type.h:6
FX_REQUEST_CONTEXT_TYPE m_RequestType
virtual VOID Dispose(VOID)
virtual VOID CopyParameters(__in FxRequestBase *Request)
unsigned char UCHAR
Definition: xmlstorage.h:181
_Must_inspect_result_ _In_ WDFUSBPIPE _In_ WDFREQUEST _In_opt_ WDFMEMORY ReadMemory
Definition: wdfusb.h:1996
virtual VOID StoreAndReferenceMemory(__in FxRequestBuffer *Buffer)
_Must_inspect_result_ _In_ WDFDEVICE _In_ BOOLEAN _In_opt_ PVOID Tag
Definition: wdfdevice.h:4061
FxInternalIoctlParams InternalIoctlParams
UCHAR FX_REQUEST_CONTEXT_TYPE
WDF_REQUEST_COMPLETION_PARAMS m_CompletionParams
static VOID _StoreAndReferenceMemoryWorker(__in PVOID Tag, __deref_out_opt IFxMemory **PPMemory, __in FxRequestBuffer *Buffer)
#define __deref_out_opt
Definition: dbghelp.h:29
__inline BOOLEAN IsType(__in FX_REQUEST_CONTEXT_TYPE Type)
_Must_inspect_result_ _In_ WDFUSBPIPE _In_ WDFREQUEST _In_opt_ WDFMEMORY WriteMemory
Definition: wdfusb.h:1914
struct _FxInternalIoctlParams FxInternalIoctlParams
#define __in
Definition: dbghelp.h:35