ReactOS  0.4.15-dev-2947-g59e1b78
fxstump.hpp
Go to the documentation of this file.
1 /*++
2 
3 Copyright (c) Microsoft Corporation
4 
5 Module Name:
6 
7  FxStump.hpp
8 
9 Abstract:
10 
11 Author:
12 
13 Revision History:
14 
15 --*/
16 
17 #ifndef _FXSTUMP_HPP_
18 #define _FXSTUMP_HPP_
19 
20 struct FxStump {
21 
22 protected:
24  VOID
25  )
26  {
27  }
28 
29 public:
30  PVOID
31  operator new(
32  __in size_t Size,
33  __in PFX_DRIVER_GLOBALS FxDriverGlobals
34  )
35  {
36  return FxPoolAllocate(FxDriverGlobals, NonPagedPool, Size);
37  }
38 
39  PVOID
40  operator new(
41  __in size_t Size,
42  __in PFX_DRIVER_GLOBALS FxDriverGlobals,
44  )
45  {
46  return FxPoolAllocate(FxDriverGlobals, PoolType, Size);
47  }
48 
49  VOID
50  operator delete(
52  )
53  {
54  if (pointer) {
56  }
57  }
58 
59 #if (FX_CORE_MODE == FX_CORE_USER_MODE)
60 
61  PVOID
62  operator new[](
63  __in size_t Size,
64  __in PFX_DRIVER_GLOBALS FxDriverGlobals
65  )
66  {
67  return FxPoolAllocate(FxDriverGlobals, NonPagedPool, Size);
68  }
69 
70  VOID
71  operator delete[](
73  )
74  {
75  if (pointer) {
77  }
78  }
79 
80 #endif
81 
82 };
83 
84 struct FxGlobalsStump : public FxStump {
85 
86 private:
88 
89 public:
91  __in PFX_DRIVER_GLOBALS FxDriverGlobals
92  )
93  {
94  m_Globals = FxDriverGlobals;
95  }
96 
99  VOID
100  )
101  {
102  return m_Globals;
103  }
104 };
105 
106 #endif // _FXSTUMP_HPP_
107 
GLsizei const GLvoid * pointer
Definition: glext.h:5848
IN PVOID IN PVOID IN USHORT IN USHORT Size
Definition: pci.h:361
FxGlobalsStump(__in PFX_DRIVER_GLOBALS FxDriverGlobals)
Definition: fxstump.hpp:90
INT POOL_TYPE
Definition: typedefs.h:78
FxStump(VOID)
Definition: fxstump.hpp:23
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ _Strict_type_match_ POOL_TYPE PoolType
Definition: wdfdevice.h:3810
PFX_DRIVER_GLOBALS m_Globals
Definition: fxstump.hpp:87
void FxPoolFree(__in_xcount(ptr is at an offset from AllocationStart) PVOID ptr)
Definition: wdfpool.cpp:361
#define __in
Definition: dbghelp.h:35
PFX_DRIVER_GLOBALS GetDriverGlobals(VOID)
Definition: fxstump.hpp:98