ReactOS  0.4.15-dev-3302-ga37d9a4
fxmemorybufferfrompool.hpp
Go to the documentation of this file.
1 
2 /*++
3 
4 Copyright (c) Microsoft Corporation
5 
6 Module Name:
7 
8  FxMemoryBufferBif.hpp
9 
10 Abstract:
11 
12 Author:
13 
14 Environment:
15 
16  kernel mode only
17 
18 Revision History:
19 
20 --*/
21 
22 #ifndef _FXMEMORYBUFFERFROMPOOL_H_
23 #define _FXMEMORYBUFFERFROMPOOL_H_
24 
26 
27 public:
29  __in PFX_DRIVER_GLOBALS FxDriverGlobals,
30  __in size_t BufferSize
31  );
32 
33  static
35  NTSTATUS
36  _Create(
37  __in PFX_DRIVER_GLOBALS FxDriverGlobals,
41  __in size_t BufferSize,
43  );
44 
45  virtual
46  PVOID
48  VOID
49  )
50  {
51  return m_Pool;
52  }
53 
54  BOOLEAN
57  __in ULONG Tag
58  )
59  {
61  return m_Pool != NULL ? TRUE : FALSE;
62  }
63 
64 protected:
66  __in PFX_DRIVER_GLOBALS FxDriverGlobals,
67  __in size_t BufferSize,
68  __in USHORT ObjectSize
69  );
70 
72 
74 };
75 
77 public:
79  __in PFX_DRIVER_GLOBALS FxDriverGlobals,
80  __in size_t BufferSize,
81  __in CfxDeviceBase* DeviceBase
82  ) : FxMemoryBufferFromPool(FxDriverGlobals, BufferSize, sizeof(*this))
83  {
84  SetDeviceBase(DeviceBase);
85  }
86 };
87 
88 #endif // _FXMEMORYBUFFERFROMPOOL_H_
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList
#define __in_opt
Definition: dbghelp.h:38
#define TRUE
Definition: types.h:120
LONG NTSTATUS
Definition: precomp.h:26
VOID SetDeviceBase(__in CfxDeviceBase *DeviceBase)
Definition: fxobject.hpp:797
static _Must_inspect_result_ NTSTATUS _Create(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in_opt PWDF_OBJECT_ATTRIBUTES Attributes, __in POOL_TYPE PoolType, __in ULONG PoolTag, __in size_t BufferSize, __out FxMemoryObject **Buffer)
#define FALSE
Definition: types.h:117
static __inline PVOID MxAllocatePoolWithTag(__in POOL_TYPE PoolType, __in SIZE_T NumberOfBytes, __in ULONG Tag)
Definition: mxmemorykm.h:30
#define __out
Definition: dbghelp.h:62
unsigned char BOOLEAN
Definition: bufpool.h:45
FxMemoryPagedBufferFromPool(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in size_t BufferSize, __in CfxDeviceBase *DeviceBase)
INT POOL_TYPE
Definition: typedefs.h:78
Type
Definition: Type.h:6
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _In_ _Strict_type_match_ POOL_TYPE _In_opt_ ULONG PoolTag
Definition: wdfmemory.h:159
FxMemoryBufferFromPool(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in size_t BufferSize)
#define _Must_inspect_result_
Definition: ms_sal.h:558
_Must_inspect_result_ _In_ WDFDEVICE _In_ BOOLEAN _In_opt_ PVOID Tag
Definition: wdfdevice.h:4061
virtual size_t GetBufferSize(VOID)
unsigned short USHORT
Definition: pedump.c:61
#define NULL
Definition: types.h:112
BOOLEAN AllocateBuffer(__in POOL_TYPE Type, __in ULONG Tag)
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ _Strict_type_match_ POOL_TYPE PoolType
Definition: wdfdevice.h:3810
unsigned int ULONG
Definition: retypes.h:1
#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