ReactOS  0.4.15-dev-3302-ga37d9a4
fxfileobjectcallbacks.hpp
Go to the documentation of this file.
1 /*++
2 
3 Copyright (c) Microsoft Corporation
4 
5 Module Name:
6 
7  FxFileObjectCallbacks.h
8 
9 Abstract:
10 
11  This module implements the I/O package queue object callbacks
12 
13 Author:
14 
15 
16 
17 
18 Environment:
19 
20  Both kernel and user mode
21 
22 Revision History:
23 
24 --*/
25 
26 #ifndef _FXFILEOBJECTCALLBACKS_H
27 #define _FXFILEOBJECTCALLBACKS_H
28 
29 
30 //
31 // EvtDeviceFileCreate callback delegate
32 //
34 
35 public:
37 
39  VOID
40  ) :
42  {
43  Method = NULL;
44  }
45 
46  VOID
48  __in WDFDEVICE Device,
49  __in WDFREQUEST Request,
50  __in_opt WDFFILEOBJECT FileObject
51  )
52  {
53 
54  if (Method != NULL) {
55  KIRQL irql = 0;
56 
60  }
61  }
62 };
63 
64 //
65 // EvtFileCleanup callback delegate
66 //
68 
69 public:
71 
73  VOID
74  ) :
76  {
77  Method = NULL;
78  }
79 
80  void
82  __in_opt WDFFILEOBJECT FileObject
83  )
84  {
85  if (Method != NULL) {
86  KIRQL irql = 0;
87 
91  }
92  }
93 };
94 
95 //
96 // EvtFileClose callback delegate
97 //
99 
100 public:
102 
104  VOID
105  ) :
107  {
108  Method = NULL;
109  }
110 
111  void
113  __in_opt WDFFILEOBJECT FileObject
114  )
115  {
116  if (Method != NULL) {
117  KIRQL irql = 0;
118 
121  CallbackEnd(irql);
122  }
123  }
124 };
125 
126 //
127 // EvtDeviceFileCreate callback delegate
128 //
130 
131 public:
133 
135  VOID
136  ) :
138  {
139  Method = NULL;
140  }
141 
142  BOOLEAN
144  __in WDFDEVICE Device,
145  __in WDFREQUEST Request,
146  __in_opt WDFFILEOBJECT FileObject
147  )
148  {
149  BOOLEAN claimed = FALSE;
150 
151  if (Method != NULL) {
152  KIRQL irql = 0;
153 
155  claimed = Method(Device, Request, FileObject);
156  CallbackEnd(irql);
157  }
158 
159  return claimed;
160  }
161 };
162 
163 //
164 // Collection of file-object callbacks.
165 //
166 struct FxFileObjectInfo : public FxStump {
167 
173  {
176  }
177 
179  {
181  }
182 
184 
189 
193 
195 
197 };
198 
199 #endif // _FXFILEOBJECTCALLBACKS_H
200 
FxFileObjectFileClose EvtFileClose
FxFileObjectFileCleanup EvtFileCleanup
__inline void CallbackStart(__out PKIRQL PreviousIrql)
Definition: fxcallback.hpp:115
BOOLEAN Invoke(__in WDFDEVICE Device, __in WDFREQUEST Request, __in_opt WDFFILEOBJECT FileObject)
#define __in_opt
Definition: dbghelp.h:38
PFN_WDFCX_DEVICE_FILE_CREATE Method
enum _WDF_TRI_STATE WDF_TRI_STATE
void Invoke(__in_opt WDFFILEOBJECT FileObject)
FxFileObjectFileCreate EvtFileCreate
_In_ WDFREQUEST Request
Definition: wdfdevice.h:547
KIRQL irql
Definition: wave.h:1
EVT_WDF_FILE_CLEANUP * PFN_WDF_FILE_CLEANUP
Definition: wdfdevice.h:578
_Must_inspect_result_ FORCEINLINE BOOLEAN IsListEmpty(_In_ const LIST_ENTRY *ListHead)
Definition: rtlfuncs.h:57
BOOLEAN(STDCALL * PFN_WDFCX_DEVICE_FILE_CREATE)(_In_ WDFDEVICE Device, _In_ WDFREQUEST Request, _In_opt_ WDFFILEOBJECT FileObject)
Definition: wdfcx.h:12
UCHAR KIRQL
Definition: env_spec_w32.h:591
#define FALSE
Definition: types.h:117
VOID Invoke(__in WDFDEVICE Device, __in WDFREQUEST Request, __in_opt WDFFILEOBJECT FileObject)
EVT_WDF_FILE_CLOSE * PFN_WDF_FILE_CLOSE
Definition: wdfdevice.h:565
enum _WDF_FILEOBJECT_CLASS WDF_FILEOBJECT_CLASS
FxCxDeviceInfo * CxDeviceInfo
unsigned char BOOLEAN
FxCxFileObjectFileCreate EvtCxFileCreate
WDF_FILEOBJECT_CLASS FileObjectClass
PFN_WDF_DEVICE_FILE_CREATE Method
_In_ WDFREQUEST _In_ WDFFILEOBJECT FileObject
Definition: wdfdevice.h:547
WDF_TRI_STATE AutoForwardCleanupClose
__inline void CallbackEnd(__in KIRQL PreviousIrql)
Definition: fxcallback.hpp:126
#define ASSERT(a)
Definition: mode.c:44
void Invoke(__in_opt WDFFILEOBJECT FileObject)
EVT_WDF_DEVICE_FILE_CREATE * PFN_WDF_DEVICE_FILE_CREATE
Definition: wdfdevice.h:552
Definition: typedefs.h:119
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474
#define InitializeListHead(ListHead)
Definition: env_spec_w32.h:944
#define NULL
Definition: types.h:112
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
#define __in
Definition: dbghelp.h:35
WDF_OBJECT_ATTRIBUTES Attributes
_Must_inspect_result_ _In_ WDFDMAENABLER _In_ _In_opt_ PWDF_OBJECT_ATTRIBUTES Attributes