ReactOS 0.4.15-dev-5669-g09dde2c
fxwmiirphandler.hpp
Go to the documentation of this file.
1/*++
2
3Copyright (c) Microsoft Corporation
4
5Module Name:
6
7 FxWmiIrpHandler.hpp
8
9Abstract:
10
11 This module implements the wmi IRP handler for the driver frameworks.
12
13Author:
14
15
16
17Environment:
18
19 Both kernel and user mode
20
21Revision History:
22
23
24--*/
25
26#ifndef _FXWMIIRPHANDLER_H_
27#define _FXWMIIRPHANDLER_H_
28
29typedef
37 );
38
42};
43
44class FxWmiIrpHandler : public FxPackage {
46
47public:
48
50 __in PFX_DRIVER_GLOBALS FxDriverGlobals,
53 );
54
56
60 VOID
61 );
62
68 );
69
70 virtual
75 );
76
80 VOID
81 );
82
83 VOID
85 VOID
86 );
87
88 VOID
89 Cleanup(
90 VOID
91 );
92
93 VOID
95 VOID
96 );
97
103 );
104
108 __in PWDF_WMI_PROVIDER_CONFIG ProviderConfig,
111 );
112
113protected:
114 static
115 VOID
117 VOID
118 );
119
126 );
127
128 VOID
131 );
132
133 VOID
136 );
137
142 );
143
149 );
150
151private:
152 static
157 __in PIRP Irp,
160 );
161
162 static
167 __in PIRP Irp,
170 );
171
172 static
177 __in PIRP Irp,
180 );
181
182 static
187 __in PIRP Irp,
190 );
191
192 static
197 __in PIRP Irp,
200 );
201
202 static
205 _RegInfo(
207 __in PIRP Irp,
210 );
211
212 static
217 __in PIRP Irp,
220 );
221
222 VOID
224 __in PIRP Irp,
227 );
228
229 VOID
231 __in PIRP Irp,
234 );
235
236 VOID
238 __in PIRP Irp,
241 );
242
246 __in PIRP Irp,
249 );
250
251 BOOLEAN
254 );
255
256 static
258
259 VOID
261 VOID
262 );
263
264 VOID
266 LONG count;
267
269 ASSERT(count > 1);
271 }
272
273 VOID
275 LONG count;
276
278 ASSERT(count >= 0);
279 if (count == 0) {
281 }
282 }
283
284 VOID
286
288
290 }
291
292protected:
298 };
299
300protected:
302
304
306
308
310
311 //
312 // count of references taken every time an update is needed
313 //
315
316 //
317 // WMI unregister waits on this event to ensure no upadtes are allowed
318 // after unregister.
319 //
321
323
325
326
327};
328
329#endif // _FXWMIIRPHANDLER_H_
unsigned char BOOLEAN
Type
Definition: Type.h:7
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
LONG NTSTATUS
Definition: precomp.h:26
const struct winhelp_callbacks Callbacks
Definition: callback.c:161
@ Update
Definition: registry.c:565
__in __drv_restoresIRQL KIRQL OldIrql
Definition: fxobject.hpp:1465
BOOLEAN DeferUpdateLocked(__in KIRQL OldIrql)
static MX_WORKITEM_ROUTINE _UpdateGuids
_Must_inspect_result_ FxWmiProvider * FindProviderReferenced(__in LPGUID Guid, __in PVOID Tag)
_Must_inspect_result_ NTSTATUS HandleWmiTraceRequest(__in PIRP Irp, __in FxTraceInfo *Info)
VOID RemoveProvider(__in FxWmiProvider *Provider)
static VOID CheckAssumptions(VOID)
static _Must_inspect_result_ NTSTATUS _ExecuteMethod(__in FxWmiIrpHandler *This, __in PIRP Irp, __in FxWmiProvider *Provider, __in FxWmiInstance *Instance)
VOID CompleteWmiExecuteMethodRequest(__in PIRP Irp, __in NTSTATUS Status, __in ULONG BufferUsed)
PIO_WORKITEM m_WorkItem
_Must_inspect_result_ NTSTATUS AddProvider(__in FxWmiProvider *Provider, __out_opt PBOOLEAN Update=NULL)
LIST_ENTRY m_ProvidersListHead
WmiRegisteredState m_RegisteredState
VOID RemoveProviderLocked(__in FxWmiProvider *Provider)
static _Must_inspect_result_ NTSTATUS _RegInfo(__in FxWmiIrpHandler *This, __in PIRP Irp, __in_opt FxWmiProvider *Provider, __in_opt FxWmiInstance *Instance)
_Must_inspect_result_ NTSTATUS AddPowerPolicyProviderAndInstance(__in PWDF_WMI_PROVIDER_CONFIG ProviderConfig, __in FxWmiInstanceInternalCallbacks *Callbacks, __inout FxWmiInstanceInternal **Instance)
VOID UpdateGuids(VOID)
static _Must_inspect_result_ NTSTATUS _ChangeSingleInstance(__in FxWmiIrpHandler *This, __in PIRP Irp, __in FxWmiProvider *Provider, __in FxWmiInstance *Instance)
_Must_inspect_result_ FxWmiProvider * FindProviderLocked(__in LPGUID Guid)
static _Must_inspect_result_ NTSTATUS _QueryAllData(__in FxWmiIrpHandler *This, __in PIRP Irp, __in FxWmiProvider *Provider, __in_opt FxWmiInstance *Instance)
static _Must_inspect_result_ NTSTATUS _ChangeSingleItem(__in FxWmiIrpHandler *This, __in PIRP Irp, __in FxWmiProvider *Provider, __in FxWmiInstance *Instance)
static const FxWmiMinorEntry m_WmiDispatchTable[]
_Must_inspect_result_ NTSTATUS PostCreateDeviceInitialize(VOID)
static _Must_inspect_result_ NTSTATUS _EnableDisableEventsAndCollection(__in FxWmiIrpHandler *This, __in PIRP Irp, __in FxWmiProvider *Provider, __in FxWmiInstance *Instance)
_Must_inspect_result_ NTSTATUS Register(VOID)
VOID CompleteWmiQueryAllDataRequest(__in PIRP Irp, __in NTSTATUS Status, __in ULONG BufferUsed)
VOID DecrementUpdateCountAndWait()
_Must_inspect_result_ NTSTATUS AddProviderLocked(__in FxWmiProvider *Provider, __in KIRQL Irql, __out_opt PBOOLEAN Update=NULL)
VOID ResetStateForPdoRestart(VOID)
static _Must_inspect_result_ NTSTATUS _QuerySingleInstance(__in FxWmiIrpHandler *This, __in PIRP Irp, __in FxWmiProvider *Provider, __in FxWmiInstance *Instance)
_Must_inspect_result_ NTSTATUS CompleteWmiRequest(__in PIRP Irp, __in NTSTATUS Status, __in ULONG BufferUsed)
VOID CompleteWmiQuerySingleInstanceRequest(__in PIRP Irp, __in NTSTATUS Status, __in ULONG BufferUsed)
_In_ PIRP Irp
Definition: csq.h:116
_Out_ PKIRQL Irql
Definition: csq.h:179
#define __out_opt
Definition: dbghelp.h:65
#define __in
Definition: dbghelp.h:35
#define __inout
Definition: dbghelp.h:50
#define __in_opt
Definition: dbghelp.h:38
#define NULL
Definition: types.h:112
#define NTSTATUS
Definition: precomp.h:20
static const WCHAR Cleanup[]
Definition: register.c:80
UCHAR KIRQL
Definition: env_spec_w32.h:591
USHORT WDFTYPE
Definition: fxtypes.h:29
@ FX_TYPE_WMI_IRP_HANDLER
Definition: fxtypes.h:95
_Must_inspect_result_ NTSTATUS(* PFN_WMI_HANDLER_MINOR_DISPATCH)(__in FxWmiIrpHandler *This, __in PIRP Irp, __in FxWmiProvider *Provider, __in FxWmiInstance *Instance)
Status
Definition: gdiplustypes.h:25
GLuint GLuint GLsizei count
Definition: gl.h:1545
#define ASSERT(a)
Definition: mode.c:44
#define _Must_inspect_result_
Definition: ms_sal.h:558
IO_WORKITEM_ROUTINE MX_WORKITEM_ROUTINE
Definition: mxworkitemkm.h:26
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
long LONG
Definition: pedump.c:60
NTSTATUS EnterCRAndWaitAndLeave(VOID)
Definition: fxwaitlock.hpp:87
VOID Set(VOID)
Definition: fxwaitlock.hpp:144
__in PFN_WMI_HANDLER_MINOR_DISPATCH Handler
__in BOOLEAN CheckInstance
Definition: typedefs.h:120
unsigned char * PBOOLEAN
Definition: typedefs.h:53
uint32_t ULONG
Definition: typedefs.h:59
_Must_inspect_result_ _In_ WDFCHILDLIST _In_ PWDF_CHILD_LIST_ITERATOR _Out_ WDFDEVICE _Inout_opt_ PWDF_CHILD_RETRIEVE_INFO Info
Definition: wdfchildlist.h:690
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474
_Must_inspect_result_ _In_ WDFDEVICE _In_ BOOLEAN _In_opt_ PVOID Tag
Definition: wdfdevice.h:4065
_Must_inspect_result_ _In_ WDFOBJECT _In_ CONST GUID * Guid
Definition: wdfobject.h:762
_In_ ULONG _Out_ PULONG BufferUsed
Definition: wdfwmi.h:92
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_WMI_INSTANCE_CONFIG _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_opt_ WDFWMIINSTANCE * Instance
Definition: wdfwmi.h:481
_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