ReactOS 0.4.15-dev-7928-g68a8619
fxstump.hpp
Go to the documentation of this file.
1/*++
2
3Copyright (c) Microsoft Corporation
4
5Module Name:
6
7 FxStump.hpp
8
9Abstract:
10
11Author:
12
13Revision History:
14
15--*/
16
17#ifndef _FXSTUMP_HPP_
18#define _FXSTUMP_HPP_
19
20struct FxStump {
21
22protected:
24 VOID
25 )
26 {
27 }
28
29public:
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
84struct FxGlobalsStump : public FxStump {
85
86private:
88
89public:
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
#define __in
Definition: dbghelp.h:35
#define NonPagedPool
Definition: env_spec_w32.h:307
void FxPoolFree(__in_xcount(ptr is at an offset from AllocationStart) PVOID ptr)
Definition: wdfpool.cpp:361
GLsizei const GLvoid * pointer
Definition: glext.h:5848
PFX_DRIVER_GLOBALS m_Globals
Definition: fxstump.hpp:87
FxGlobalsStump(__in PFX_DRIVER_GLOBALS FxDriverGlobals)
Definition: fxstump.hpp:90
PFX_DRIVER_GLOBALS GetDriverGlobals(VOID)
Definition: fxstump.hpp:98
FxStump(VOID)
Definition: fxstump.hpp:23
INT POOL_TYPE
Definition: typedefs.h:78
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ _Strict_type_match_ POOL_TYPE PoolType
Definition: wdfdevice.h:3815
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4533