ReactOS 0.4.15-dev-7674-gc0b4db1
fxmemorybufferfrompool.hpp
Go to the documentation of this file.
1
2/*++
3
4Copyright (c) Microsoft Corporation
5
6Module Name:
7
8 FxMemoryBufferBif.hpp
9
10Abstract:
11
12Author:
13
14Environment:
15
16 kernel mode only
17
18Revision History:
19
20--*/
21
22#ifndef _FXMEMORYBUFFERFROMPOOL_H_
23#define _FXMEMORYBUFFERFROMPOOL_H_
24
26
27public:
29 __in PFX_DRIVER_GLOBALS FxDriverGlobals,
30 __in size_t BufferSize
31 );
32
33 static
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
58 )
59 {
61 return m_Pool != NULL ? TRUE : FALSE;
62 }
63
64protected:
66 __in PFX_DRIVER_GLOBALS FxDriverGlobals,
67 __in size_t BufferSize,
68 __in USHORT ObjectSize
69 );
70
72
74};
75
77public:
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_
unsigned char BOOLEAN
Type
Definition: Type.h:7
LONG NTSTATUS
Definition: precomp.h:26
Definition: bufpool.h:45
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)
BOOLEAN AllocateBuffer(__in POOL_TYPE Type, __in ULONG Tag)
virtual size_t GetBufferSize(VOID)
FxMemoryPagedBufferFromPool(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in size_t BufferSize, __in CfxDeviceBase *DeviceBase)
VOID SetDeviceBase(__in CfxDeviceBase *DeviceBase)
Definition: fxobject.hpp:797
static __inline PVOID MxAllocatePoolWithTag(__in POOL_TYPE PoolType, __in SIZE_T NumberOfBytes, __in ULONG Tag)
Definition: mxmemorykm.h:30
#define __in
Definition: dbghelp.h:35
#define __in_opt
Definition: dbghelp.h:38
#define __out
Definition: dbghelp.h:62
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define _Must_inspect_result_
Definition: ms_sal.h:558
unsigned short USHORT
Definition: pedump.c:61
INT POOL_TYPE
Definition: typedefs.h:78
uint32_t ULONG
Definition: typedefs.h:59
_Must_inspect_result_ _In_ WDFDMAENABLER _In_ _In_opt_ PWDF_OBJECT_ATTRIBUTES Attributes
_Must_inspect_result_ _In_ WDFDEVICE _In_ BOOLEAN _In_opt_ PVOID Tag
Definition: wdfdevice.h:4065
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ _Strict_type_match_ POOL_TYPE PoolType
Definition: wdfdevice.h:3815
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
Definition: wdfmemory.h:254
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _In_ _Strict_type_match_ POOL_TYPE _In_opt_ ULONG PoolTag
Definition: wdfmemory.h:164
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList