ReactOS 0.4.15-dev-8207-gd73a838
fxpkggeneral.hpp
Go to the documentation of this file.
1/*++
2
3Copyright (c) Microsoft Corporation
4
5Module Name:
6
7 FxPkgGeneral.hpp
8
9Abstract:
10
11 This module implements a package to handle general dispath entry points
12 such as IRP_MJ_CREATE and IRP_MJ_CLOSE.
13
14Author:
15
16
17
18Environment:
19
20 Both kernel and user mode
21
22Revision History:
23
24--*/
25
26#ifndef _FXPKGGENERAL_H_
27#define _FXPKGGENERAL_H_
28
30
31class FxShutDown : public FxCallback {
32
33public:
35
37 VOID
38 ) :
39 FxCallback(),
41 {
42 }
43
44 VOID
46 __in WDFDEVICE Device
47 )
48 {
49 if (m_Method != NULL) {
53 }
54 }
55};
56
57#define FX_PKG_GENERAL_FLAG_CX_INFO 0x00000001
58#define FX_PKG_GENERAL_FLAG_CLIENT_INFO 0x00000002
59#define FX_PKG_GENERAL_FLAG_CX_CREATE 0x00000004
60#define FX_PKG_GENERAL_FLAG_CLIENT_CREATE 0x00000008
61
62#define FX_PKG_GENERAL_FLAG_CREATE \
63 (FX_PKG_GENERAL_FLAG_CX_CREATE | FX_PKG_GENERAL_FLAG_CLIENT_CREATE)
64
65
66class FxPkgGeneral : public FxPackage {
67
68private:
69
70 //
71 // FileObject attributes
72 //
74
75 //
76 // List of file objects info (driver and cx).
77 //
79
82
83 //
84 // Generic file object flags.
85 //
87
88 //
89 // Execution and synchronization for cx and client driver.
90 //
93
94 //
95 // This pointer allows the proper lock to be acquired
96 // based on the configuration with a minimal of runtime
97 // checks. This is configured by ConfigureConstraints().
98 // We basically inherit device's lock.
99 //
102
104
105private:
108 OnCreate(
110 );
111
114 OnClose(
116 );
117
118 BOOLEAN
121 );
122
125 OnCleanup(
127 );
128
133 );
134
138 __in PLIST_ENTRY FileObjInfoList
139 );
140
144 __in PLIST_ENTRY FileObjInfoList
145 );
146
147 VOID
149 VOID
150 );
151
158 );
159
160 static
162
163 static
165
166public:
167
169 __in PFX_DRIVER_GLOBALS FxDriverGlobals,
171 );
172
174
176 virtual
178 Dispatch(
180 );
181
186 );
187
192 );
193
194 VOID
196 __in FxIrp *Irp
197 );
198
202 __in FxIoQueue *FxQueue
203 );
204
205 BOOLEAN
207 VOID
208 );
209
210 VOID
212 __out_opt WDF_EXECUTION_LEVEL* ExecutionLevel,
213 __out_opt WDF_SYNCHRONIZATION_SCOPE* SynchronizationScope
214 ) ;
215
219 );
220
221 __inline
222 FxIoQueue*
224 )
225 {
227 }
228};
229
230#endif // _FXPKGGENERAL_H_
unsigned char BOOLEAN
LONG NTSTATUS
Definition: precomp.h:26
void __inline CallbackStart(VOID)
Definition: fxcallback.hpp:64
void __inline CallbackEnd(VOID)
Definition: fxcallback.hpp:74
Definition: fxirp.hpp:28
FxObject * m_CallbackLockObjectPtr
_Must_inspect_result_ NTSTATUS OnCleanup(__inout FxIrp *FxIrp)
_Must_inspect_result_ NTSTATUS ConfigureForwarding(__in FxIoQueue *FxQueue)
LONG m_OpenHandleCount
BOOLEAN CanDestroyControlDevice(VOID)
FxShutDown m_EvtDeviceShutdown
__inline FxIoQueue * GetDeafultInternalCreateQueue()
BOOLEAN AcquireRemoveLockForClose(__inout FxIrp *FxIrp)
VOID CreateCompleted(__in FxIrp *Irp)
_Must_inspect_result_ NTSTATUS ConfigureFileObjectClass(__in PLIST_ENTRY FileObjInfoList)
WDF_EXECUTION_LEVEL m_ExecutionLevel
FxCallbackLock * m_CallbackLockPtr
FxCallbackLock * GetCallbackLockPtrHelper(__deref_out_opt FxObject **LockObject)
_Must_inspect_result_ NTSTATUS ConfigureConstraints(__in PLIST_ENTRY FileObjInfoList)
static MdCompletionRoutineType _CreateCompletionRoutine
_Must_inspect_result_ NTSTATUS PostCreateDeviceInitialize(__in PWDFDEVICE_INIT Init)
VOID GetConstraintsHelper(__out_opt WDF_EXECUTION_LEVEL *ExecutionLevel, __out_opt WDF_SYNCHRONIZATION_SCOPE *SynchronizationScope)
VOID DecrementOpenHandleCount(VOID)
_Must_inspect_result_ NTSTATUS ForwardCreateRequest(__in FxIrp *FxIrp, __in MdCompletionRoutine CompletionRoutine, __in PVOID Context)
FxIoQueue * m_DefaultQueueForCreates
_Must_inspect_result_ NTSTATUS OnShutdown(__inout FxIrp *FxIrp)
LIST_ENTRY m_FileObjectInfoHeadList
WDF_SYNCHRONIZATION_SCOPE m_SynchronizationScope
static MdCompletionRoutineType _CreateCompletionRoutine2
_Must_inspect_result_ NTSTATUS OnClose(__inout FxIrp *FxIrp)
FxIoQueue * m_DriverCreatedQueue
_Must_inspect_result_ NTSTATUS OnCreate(__inout FxIrp *FxIrp)
FxShutDown(VOID)
VOID Invoke(__in WDFDEVICE Device)
PFN_WDF_DEVICE_SHUTDOWN_NOTIFICATION m_Method
_In_ PIRP Irp
Definition: csq.h:116
#define __out_opt
Definition: dbghelp.h:65
#define __in
Definition: dbghelp.h:35
#define __inout
Definition: dbghelp.h:50
#define __deref_out_opt
Definition: dbghelp.h:29
#define NULL
Definition: types.h:112
#define _Must_inspect_result_
Definition: ms_sal.h:558
IWudfIrp * MdIrp
Definition: mxum.h:103
WUDF_IO_COMPLETION_ROUTINE * MdCompletionRoutine
Definition: mxum.h:142
WUDF_IO_COMPLETION_ROUTINE MdCompletionRoutineType
Definition: mxum.h:142
long LONG
Definition: pedump.c:60
Definition: typedefs.h:120
#define LockObject(Object)
Definition: titypes.h:34
uint32_t ULONG
Definition: typedefs.h:59
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474
_In_ PWDFDEVICE_INIT DeviceInit
Definition: wdfcontrol.h:113
EVT_WDF_DEVICE_SHUTDOWN_NOTIFICATION * PFN_WDF_DEVICE_SHUTDOWN_NOTIFICATION
Definition: wdfcontrol.h:62
WDF_EXTERN_C_START enum _WDF_EXECUTION_LEVEL WDF_EXECUTION_LEVEL
enum _WDF_SYNCHRONIZATION_SCOPE WDF_SYNCHRONIZATION_SCOPE
_In_ WDFREQUEST _In_opt_ PFN_WDF_REQUEST_COMPLETION_ROUTINE CompletionRoutine
Definition: wdfrequest.h:895
_In_ USHORT _In_ ULONG _In_ PSOCKADDR _In_ PSOCKADDR _Reserved_ ULONG _In_opt_ PVOID _In_opt_ const WSK_CLIENT_CONNECTION_DISPATCH * Dispatch
Definition: wsk.h:188
static void Initialize()
Definition: xlate.c:212