ReactOS  0.4.15-dev-3299-gbe8e5fc
fxrequestmemory.hpp
Go to the documentation of this file.
1 
2 /*++
3 
4 Copyright (c) Microsoft. All rights reserved.
5 
6 Module Name:
7 
8  FxRequestMemory.hpp
9 
10 Abstract:
11 
12  This is the memory object for FxRequest that is sized, and
13  allows checking for read/write access.
14 
15  It's reference lifetime is tied with IRP completion in
16  FxRequest.
17 
18 Author:
19 
20 
21 
22 Environment:
23 
24  Both kernel and user mode
25 
26 Revision History:
27 
28 --*/
29 
30 #ifndef _FXREQUESTMEMORY_H_
31 #define _FXREQUESTMEMORY_H_
32 
34 public:
35 
36  // Factory function
37  static
38  NTSTATUS
39  Create(
43  );
44 
47  );
48 
49  // begin end FxMemoryObject
50  virtual
51  PVOID
52  GetBuffer(
53  VOID
54  );
55 
57  virtual
58  PMDL
59  GetMdl(
60  VOID
61  );
62 
63  virtual
64  USHORT
66  VOID
67  )
68  {
69  return m_Flags;
70  }
71  // end FxMemoryObject overrides
72 
73  VOID
74  SetBuffer(
77  _In_ PMDL BackingMdl,
78  _In_ size_t BufferSize,
80  );
81 
82  VOID
83  SetMdl(
85  __in PMDL Mdl,
86  __in PVOID MdlBuffer,
87  __in size_t BufferSize,
89  );
90 
92  NTSTATUS
95  );
96 
98  VOID
99  );
100 
101 protected:
102  VOID
105  )
106  {
107  m_Flags = Flags;
108  }
109 
110 protected:
111 
113 
114  //
115  // The m_Mdl is owned by this object and it must be freed by the this object.
116  //
118 
120 };
121 
122 #endif // _FXREQUESTMEMORY_H_
123 
124 
_In_ WDFIOTARGET _In_ PWDF_REQUEST_COMPLETION_PARAMS Params
Definition: wdfrequest.h:306
#define _Pre_writable_byte_size_(size)
Definition: ms_sal.h:647
static NTSTATUS Create(__in PFX_DRIVER_GLOBALS DriverGlobals, __in_opt PWDF_OBJECT_ATTRIBUTES Attributes, __out FxRequestMemory **Object)
#define __in_opt
Definition: dbghelp.h:38
Definition: arc.h:80
LONG NTSTATUS
Definition: precomp.h:26
_In_ WDFREQUEST Request
Definition: wdfdevice.h:547
DriverGlobals
VOID SetFlags(__in USHORT Flags)
CLIPBOARD_GLOBALS Globals
Definition: clipbrd.c:13
FxRequest * m_Request
#define __out
Definition: dbghelp.h:62
unsigned char BOOLEAN
#define _In_
Definition: ms_sal.h:308
Definition: bufpool.h:45
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
VOID SetMdl(__in FxRequest *Request, __in PMDL Mdl, __in PVOID MdlBuffer, __in size_t BufferSize, __in BOOLEAN ReadOnly)
FxRequestMemory(__in PFX_DRIVER_GLOBALS Globals)
#define _Pre_notnull_
Definition: ms_sal.h:680
#define _Must_inspect_result_
Definition: ms_sal.h:558
VOID SetBuffer(_In_ FxRequest *Request, _Pre_notnull_ _Pre_writable_byte_size_(BufferSize) PVOID Buffer, _In_ PMDL BackingMdl, _In_ size_t BufferSize, _In_ BOOLEAN ReadOnly)
_Must_inspect_result_ _In_ WDFCOLLECTION _In_ WDFOBJECT Object
virtual PVOID GetBuffer(VOID)
unsigned short USHORT
Definition: pedump.c:61
_Must_inspect_result_ NTSTATUS QueryInterface(__in FxQueryInterfaceParams *Params)
_In_ WDFDEVICE _In_ PVOID _In_opt_ PMDL Mdl
virtual USHORT GetFlags(VOID)
virtual _Must_inspect_result_ PMDL GetMdl(VOID)
#define __in
Definition: dbghelp.h:35
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
Definition: wdfmemory.h:251
_Must_inspect_result_ _In_ WDFDMAENABLER _In_ _In_opt_ PWDF_OBJECT_ATTRIBUTES Attributes