ReactOS 0.4.16-dev-112-g52265ae
fxmessagedispatchum.hpp
Go to the documentation of this file.
1/*++
2
3Copyright (c) Microsoft. All rights reserved.
4
5Module Name:
6
7 WudfDispatcher.h
8
9Abstract:
10
11 This file contains the class definition of the WUDF dispatcher object.
12
13Author:
14
15
16
17Environment:
18
19 User mode only
20
21Revision History:
22
23
24
25--*/
26#pragma once
27
28extern const GUID IID_FxMessageDispatch;
29extern const GUID IID_FxMessageDispatch2;
30
32
34 public FxStump,
35 public IFxMessageDispatch2
36{
37 //
38 // Manager functions.
39 //
40private:
43 ) :
44 m_cRefs(1),
46 {
47 }
48
49public:
51 {
52 // SAFE_RELEASE(m_Device);
53 }
54
55 static
60 _Out_ FxMessageDispatch ** ppWudfDispatcher
61 );
62
63 //
64 // IUnknown
65 //
66public:
72 );
73
74 ULONG
76 AddRef();
77
78 ULONG
80 Release();
81
82 //
83 // IFxMessageDispatch
84 //
85public:
86 virtual void __stdcall
88 _In_ IWudfIrp * pIrp
89 );
90
91 virtual void __stdcall
93 _In_ IWudfIoIrp * pCreateIrp
94 );
95
96 virtual void __stdcall
98 _In_ IWudfIoIrp * pIrp,
99 _In_opt_ IUnknown * pFxContext
100 );
101
102 virtual void __stdcall
103 ReadFile(
104 _In_ IWudfIoIrp * pIrp,
105 _In_opt_ IUnknown * pFxContext
106 );
107
108 virtual void __stdcall
109 WriteFile(
110 _In_ IWudfIoIrp * pIrp,
111 _In_opt_ IUnknown * pFxContext
112 );
113
114 virtual void __stdcall
116 _In_ IWudfIoIrp * pIrp,
117 _In_ IUnknown * pFxContext
118 );
119
120 virtual void __stdcall
121 CloseFile(
122 _In_ IWudfIoIrp * pIrp,
123 _In_ IUnknown * pFxContext
124 );
125
126 virtual
127 VOID
130 _Out_ UMINT::WDF_DEVICE_IO_BUFFER_RETRIEVAL *RetrievalMode,
131 _Out_ UMINT::WDF_DEVICE_IO_TYPE *RWPreference,
132 _Out_ UMINT::WDF_DEVICE_IO_TYPE *IoctlPreference
133 );
134
135 virtual void __stdcall
137 _In_ IWudfIoIrp * pIrp,
138 _In_opt_ IUnknown * pFxContext
139 );
140
141 virtual void __stdcall
143 _In_ IWudfIoIrp * pIrp,
144 _In_opt_ IUnknown * pFxContext
145 );
146
147 virtual void __stdcall
149 _In_ IWudfIoIrp * pIrp,
150 _In_opt_ IUnknown * pFxContext
151 );
152
153 virtual NTSTATUS __stdcall
155 _In_ RdWmiPowerAction Action,
156 _Out_ BOOLEAN *QueryResult
157 );
158
159 //
160 // We should remove these methods from this interface.
161 //
164 _In_ LPCGUID pDeviceInterfaceGuid,
165 _In_ PCWSTR pSymbolicLink
166 );
167
168 virtual void __stdcall
170 _In_ WUDF_INTERFACE_CONTEXT RemoteInterfaceID
171 );
172
173 virtual BOOL __stdcall
175 _In_ DWORD Id,
176 _In_ PVOID DataBuffer,
177 _In_ SIZE_T cbDataBufferSize
178 );
179
180 virtual ULONG __stdcall
182 VOID
183 );
184
185 virtual void __stdcall
187 VOID
188 );
189
190 virtual void __stdcall
192 VOID
193 );
194
195 //
196 // Additional public functions.
197 //
198public:
199 //
200 // Returns the Dispatcher object from the given interface without
201 // incrementing the refcount.
202 //
203 static
206 _In_ IFxMessageDispatch* pIFxMessageDispatch
207 );
208
209 //
210 // Returns the specified interface from the given object without
211 // incrementing the refcount.
212 //
213 static
214 IFxMessageDispatch*
216 _In_ FxMessageDispatch* pWudfDispatcher
217 );
218
219 //
220 // Returns a weak ref to the embedded user-mode driver object.
221 //
224 VOID
225 )
226 {
228 }
229
232 VOID
233 )
234 {
235 return m_Device->GetDeviceObject();
236 }
237
238 //
239 // Data members.
240 //
241private:
242 //
243 // Reference count for debugging purposes. The lifetime is managed by
244 // FxDevice.
245 //
247
248 //
249 // Device object associated with this dispatcher object.
250 //
252};
253
DWORD Id
unsigned char BOOLEAN
LONG NTSTATUS
Definition: precomp.h:26
__inline FxDriver * GetDriver(VOID)
Definition: fxdevice.hpp:164
MdDeviceObject __inline GetDeviceObject(VOID)
Definition: fxdevice.hpp:174
__inline MdDriverObject GetDriverObject(VOID)
Definition: fxdriver.hpp:252
static IFxMessageDispatch * _GetDispatcherItf(_In_ FxMessageDispatch *pWudfDispatcher)
static NTSTATUS _CreateAndInitialize(_In_ PFX_DRIVER_GLOBALS DriverGlobals, _In_ FxDevice *Device, _Out_ FxMessageDispatch **ppWudfDispatcher)
virtual BOOL __stdcall TransportQueryID(_In_ DWORD Id, _In_ PVOID DataBuffer, _In_ SIZE_T cbDataBufferSize)
virtual void __stdcall FlushBuffers(_In_ IWudfIoIrp *pIrp, _In_opt_ IUnknown *pFxContext)
MdDeviceObject GetDeviceObject(VOID)
virtual VOID __stdcall GetPreferredTransferMode(_Out_ UMINT::WDF_DEVICE_IO_BUFFER_RETRIEVAL *RetrievalMode, _Out_ UMINT::WDF_DEVICE_IO_TYPE *RWPreference, _Out_ UMINT::WDF_DEVICE_IO_TYPE *IoctlPreference)
virtual void __stdcall QueryInformationFile(_In_ IWudfIoIrp *pIrp, _In_opt_ IUnknown *pFxContext)
PDRIVER_OBJECT_UM GetDriverObject(VOID)
FxMessageDispatch(_In_ FxDevice *Device)
HRESULT __stdcall QueryInterface(_In_ REFIID riid, _Out_ LPVOID *ppvObject)
ULONG __stdcall AddRef()
virtual WUDF_INTERFACE_CONTEXT __stdcall RemoteInterfaceArrival(_In_ LPCGUID pDeviceInterfaceGuid, _In_ PCWSTR pSymbolicLink)
virtual void __stdcall PoFxDevicePowerNotRequired(VOID)
virtual void __stdcall CloseFile(_In_ IWudfIoIrp *pIrp, _In_ IUnknown *pFxContext)
virtual void __stdcall SetInformationFile(_In_ IWudfIoIrp *pIrp, _In_opt_ IUnknown *pFxContext)
virtual NTSTATUS __stdcall ProcessWmiPowerQueryOrSetData(_In_ RdWmiPowerAction Action, _Out_ BOOLEAN *QueryResult)
virtual void __stdcall CleanupFile(_In_ IWudfIoIrp *pIrp, _In_ IUnknown *pFxContext)
virtual void __stdcall DeviceControl(_In_ IWudfIoIrp *pIrp, _In_opt_ IUnknown *pFxContext)
virtual void __stdcall WriteFile(_In_ IWudfIoIrp *pIrp, _In_opt_ IUnknown *pFxContext)
ULONG __stdcall Release()
virtual void __stdcall RemoteInterfaceRemoval(_In_ WUDF_INTERFACE_CONTEXT RemoteInterfaceID)
static FxMessageDispatch * _GetObjFromItf(_In_ IFxMessageDispatch *pIFxMessageDispatch)
virtual void __stdcall DispatchPnP(_In_ IWudfIrp *pIrp)
virtual ULONG __stdcall GetDirectTransferThreshold(VOID)
virtual void __stdcall PoFxDevicePowerRequired(VOID)
#define ReadFile(a, b, c, d, e)
Definition: compat.h:742
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
DriverGlobals
const GUID IID_FxMessageDispatch
const GUID IID_FxMessageDispatch2
FxIrp * pIrp
REFIID riid
Definition: atlbase.h:39
#define _Out_
Definition: ms_sal.h:345
#define _In_
Definition: ms_sal.h:308
#define _In_opt_
Definition: ms_sal.h:309
UINT64 WUDF_INTERFACE_CONTEXT
Definition: mxum.h:111
long LONG
Definition: pedump.c:60
#define REFIID
Definition: guiddef.h:118
const uint16_t * PCWSTR
Definition: typedefs.h:57
ULONG_PTR SIZE_T
Definition: typedefs.h:80
#define __stdcall
Definition: typedefs.h:25
uint32_t ULONG
Definition: typedefs.h:59
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474
_In_ WDFIOTARGET _In_ _Strict_type_match_ WDF_IO_TARGET_SENT_IO_ACTION Action
Definition: wdfiotarget.h:510
#define CreateFile
Definition: winbase.h:3749
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD _Outptr_opt_ void ** ppvObject
Definition: wincrypt.h:6082