ReactOS 0.4.16-dev-91-g764881a
fxcallback.hpp
Go to the documentation of this file.
1/*++
2
3Copyright (c) Microsoft Corporation
4
5Module Name:
6
7 FxCallback.hpp
8
9Abstract:
10
11 This represents a delegate object base class for
12 calling back into the driver.
13
14Author:
15
16
17
18
19Revision History:
20
21--*/
22
23#ifndef _FXCALLBACK_H_
24#define _FXCALLBACK_H_
25
26extern "C" {
27#if defined(EVENT_TRACING)
28#include "FxCallback.hpp.tmh"
29#endif
30}
31
33
34public:
35
37 __in_opt PFX_DRIVER_GLOBALS FxDriverGlobals = NULL
38 )
39 {
40 UNREFERENCED_PARAMETER(FxDriverGlobals);
41 }
42
43 PVOID
44 operator new(
45 __in size_t Size,
46 __in PFX_DRIVER_GLOBALS FxDriverGlobals,
48 )
49 {
50 return FxPoolAllocate(FxDriverGlobals, PoolType, Size);
51 }
52
53 VOID
54 operator delete(
56 )
57 {
59 }
60
61protected:
62 void
63 __inline
65 VOID
66 )
67 {
68 // intentionally does nothing, visual place marker only for now
69 DO_NOTHING();
70 }
71
72 void
73 __inline
75 VOID
76 )
77 {
78 // intentionally does nothing, visual place marker only for now
79 DO_NOTHING();
80 }
81};
82
84
85private:
87
88public:
90 VOID
91 )
92 {
94 }
95
98 VOID
99 )
100 {
101 return m_CallbackLock;
102 }
103
104 void
107 )
108 {
110 }
111
112protected:
113 __inline
114 void
116 __out PKIRQL PreviousIrql
117 )
118 {
119 if (m_CallbackLock != NULL) {
120 m_CallbackLock->Lock(PreviousIrql);
121 }
122 }
123
124 __inline
125 void
127 __in KIRQL PreviousIrql
128 )
129 {
130 if (m_CallbackLock != NULL) {
131 m_CallbackLock->Unlock(PreviousIrql);
132 }
133 }
134};
135
136#endif // _FXCALLBACK_H_
virtual void Lock(__out PKIRQL PreviousIrql)=0
virtual void Unlock(__in KIRQL PreviousIrql)=0
void __inline CallbackStart(VOID)
Definition: fxcallback.hpp:64
FxCallback(__in_opt PFX_DRIVER_GLOBALS FxDriverGlobals=NULL)
Definition: fxcallback.hpp:36
void __inline CallbackEnd(VOID)
Definition: fxcallback.hpp:74
FxCallbackLock * m_CallbackLock
Definition: fxcallback.hpp:86
__inline void CallbackEnd(__in KIRQL PreviousIrql)
Definition: fxcallback.hpp:126
FxCallbackLock * GetCallbackLockPtr(VOID)
Definition: fxcallback.hpp:97
FxLockedCallback(VOID)
Definition: fxcallback.hpp:89
__inline void CallbackStart(__out PKIRQL PreviousIrql)
Definition: fxcallback.hpp:115
void SetCallbackLockPtr(FxCallbackLock *Lock)
Definition: fxcallback.hpp:105
#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
UCHAR KIRQL
Definition: env_spec_w32.h:591
KIRQL * PKIRQL
Definition: env_spec_w32.h:592
#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
#define DO_NOTHING()
Definition: mxgeneral.h:32
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
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
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFWAITLOCK * Lock
Definition: wdfsync.h:127