ReactOS 0.4.15-dev-8393-g61b7fb9
fxpkgfdo.hpp
Go to the documentation of this file.
1/*++
2
3Copyright (c) Microsoft Corporation
4
5Module Name:
6
7 FxPkgFdo.hpp
8
9Abstract:
10
11 This module implements the pnp package for Fdo objects.
12
13Author:
14
15
16
17Environment:
18
19 Both kernel and user mode
20
21Revision History:
22
23--*/
24
25#ifndef _FXPKGFDO_H_
26#define _FXPKGFDO_H_
27
30
32};
33
34class FxPkgFdo : public FxPkgPnp
35{
36public:
37 //
38 // Pnp Properties
39 //
41
43
44 //
45 // Default target to the attached device in the stack
46 //
48
49 //
50 // A virtual target to yourself. This allows a cx to send
51 // the client. It may also be used by the client to send IO to itself.
52 //
54
55private:
56
58
59 //
60 // The following structure contains the function pointer table
61 // for the "events" this package can raise.
62 //
64
66
68
70
71 //
72 // Table of internal methods to handle PnP minor function codes.
73 //
75
76 //
77 // Table of internal methods to handle power minor function codes.
78 //
80
82 __in PFX_DRIVER_GLOBALS FxDriverGlobals,
84 );
85
86public:
87
89 static
91 _Create(
94 __deref_out FxPkgFdo ** PkgFdo
95 );
96
101 );
102
106 __in PWDF_CHILD_LIST_CONFIG ListConfig,
107 __in PWDF_OBJECT_ATTRIBUTES ListAttributes
108 );
109
111 virtual
115 );
116
120 VOID
121 );
122
125 SetFilter(
127 );
128
129 BOOLEAN
131 VOID
132 )
133 {
134 return m_Filter;
135 }
136
137private:
138
140 virtual
144 );
145
147 virtual
151 );
152
154 static
159 );
160
162 static
167 );
168
170 static
175 );
176
181 );
182
184 static
189 );
190
192 static
197 );
198
203 );
204
205 VOID
208 );
209
210 VOID
213 );
214
216 static
222 );
223
225 static
230 );
231
236 );
237
239 static
244 );
245
247 static
253 );
254
255 VOID
258 );
259
260 virtual
261 BOOLEAN
263 VOID
264 );
265
266 virtual
269 VOID
270 );
271
272 virtual
275 VOID
276 );
277
278 virtual
281 VOID
282 );
283
284 virtual
287 VOID
288 );
289
290 virtual
293 VOID
294 );
295
296 static
301 __in FxIrp *Irp
302 );
303
304 static
309 __in FxIrp *Irp
310 );
311
312 static
317 __in FxIrp *Irp
318 );
319
320 virtual
324 __out BOOLEAN* ParentOn
325 );
326
327 virtual
330 VOID
331 );
332
333 virtual
336 VOID
337 );
338
339 virtual
340 VOID
342 VOID
343 );
344
348 __in FxIrp *Irp
349 );
350
354 __in FxIrp *Irp
355 );
356
360 __in FxIrp *Irp
361 );
362
366 __in FxIrp *Irp
367 );
368
372 __in FxIrp *Irp
373 );
374
378 __in FxIrp *Irp
379 );
380
381 virtual
382 VOID
384 __in BOOLEAN IrpMustBePresent = TRUE
385 );
386
388 virtual
392 );
393
394 virtual
395 VOID
397 __in BOOLEAN GracefulRemove
398 );
399
400 virtual
401 VOID
403 VOID
404 );
405
406 virtual
407 VOID
409 VOID
410 );
411
413 virtual
416 VOID
417 );
418
420 virtual
423 VOID
424 );
425
426 virtual
429 VOID
430 )
431 {
433 }
434
435 virtual
438 VOID
439 )
440 {
442 }
443
447 VOID
448 );
449
450public:
451
452 static
455
456protected:
457 ~FxPkgFdo();
458
459 static
462
463 static
466
468 static
470 STDCALL
475 );
476
478 static
480 STDCALL
485 );
486};
487
488#endif // _FXPKGFDO_H
unsigned char BOOLEAN
LONG NTSTATUS
Definition: precomp.h:26
Definition: fxirp.hpp:28
static _Must_inspect_result_ NTSTATUS _Create(__in PFX_DRIVER_GLOBALS pGlobals, __in CfxDevice *Device, __deref_out FxPkgFdo **PkgFdo)
Definition: fxpkgfdo.cpp:195
virtual WDF_DEVICE_POWER_STATE PowerCheckDeviceTypeOverload(VOID)
Definition: fdopower.cpp:498
FxIoTargetSelf * m_SelfTarget
Definition: fxpkgfdo.hpp:53
REENUMERATE_SELF_INTERFACE_STANDARD m_SurpriseRemoveAndReenumerateSelfInterface
Definition: fxpkgfdo.hpp:57
_Must_inspect_result_ NTSTATUS PnpQueryDeviceRelations(__inout FxIrp *Irp)
Definition: fxpkgfdo.cpp:399
BOOLEAN m_Filter
Definition: fxpkgfdo.hpp:69
static _Must_inspect_result_ NTSTATUS _PnpQueryCapabilities(__inout FxPkgPnp *This, __inout FxIrp *Irp)
Definition: fxpkgfdo.cpp:551
FxPnpDeviceFilterResourceRequirements m_DeviceFilterRemoveResourceRequirements
Definition: fxpkgfdo.hpp:65
virtual VOID QueryForReenumerationInterface(VOID)
Definition: fxpkgfdo.cpp:1307
virtual _Must_inspect_result_ NTSTATUS FireAndForgetIrp(__inout FxIrp *Irp)
Definition: fxpkgfdo.cpp:276
virtual WDF_DEVICE_POWER_STATE PowerCheckDeviceTypeNPOverload(VOID)
Definition: fdopower.cpp:520
static const PFN_PNP_POWER_CALLBACK m_FdoPowerFunctionTable[IRP_MN_QUERY_POWER+1]
Definition: fxpkgfdo.hpp:79
static _Must_inspect_result_ NTSTATUS _PnpQueryDeviceRelations(__inout FxPkgPnp *This, __inout FxIrp *Irp)
Definition: fxpkgfdo.cpp:372
_Must_inspect_result_ NTSTATUS DispatchDeviceQueryPower(__in FxIrp *Irp)
Definition: fdopower.cpp:446
BOOLEAN IsFilter(VOID)
Definition: fxpkgfdo.hpp:130
static _Must_inspect_result_ NTSTATUS STDCALL _PnpStartDeviceCompletionRoutine(__in MdDeviceObject DeviceObject, __inout MdIrp Irp, __inout PVOID Context)
Definition: fxpkgfdo.cpp:1462
_Must_inspect_result_ NTSTATUS SetFilter(__in BOOLEAN Value)
Definition: fxpkgfdo.cpp:892
VOID HandleQueryPnpDeviceStateCompletion(__inout FxIrp *Irp)
Definition: fxpkgfdo.cpp:763
virtual WDF_DEVICE_PNP_STATE PnpEventCheckForDevicePresenceOverload(VOID)
Definition: fxpkgfdo.cpp:1133
_Must_inspect_result_ NTSTATUS RaiseDevicePower(__in FxIrp *Irp)
Definition: fdopower.cpp:353
static _Must_inspect_result_ NTSTATUS STDCALL _PnpFilteredStartDeviceCompletionRoutine(__in MdDeviceObject DeviceObject, __inout MdIrp Irp, __inout PVOID Context)
Definition: fxpkgfdo.cpp:1438
virtual WDF_DEVICE_PNP_STATE PnpEventFdoRemovedOverload(VOID)
Definition: fxpkgfdo.cpp:1224
FxPnpDeviceFilterResourceRequirements m_DeviceFilterAddResourceRequirements
Definition: fxpkgfdo.hpp:63
static _Must_inspect_result_ NTSTATUS _PnpQueryCapabilitiesCompletionRoutine(__in MdDeviceObject DeviceObject, __inout MdIrp Irp, __inout PVOID Context)
Definition: fxpkgfdokm.cpp:227
static _Must_inspect_result_ NTSTATUS _PnpFilterResourceRequirements(__inout FxPkgPnp *This, __inout FxIrp *Irp)
Definition: fxpkgfdo.cpp:748
virtual VOID PowerReleasePendingDeviceIrp(__in BOOLEAN IrpMustBePresent=TRUE)
Definition: fdopower.cpp:464
_Must_inspect_result_ NTSTATUS DispatchSystemQueryPower(__in FxIrp *Irp)
Definition: fdopower.cpp:417
virtual _Must_inspect_result_ NTSTATUS QueryForPowerThread(VOID)
Definition: fxpkgfdo.cpp:1387
FxPnpDeviceRemoveAddedResources m_DeviceRemoveAddedResources
Definition: fxpkgfdo.hpp:67
virtual WDF_DEVICE_PNP_STATE PnpEventEjectHardwareOverload(VOID)
Definition: fxpkgfdo.cpp:1099
FxChildList * m_DefaultDeviceList
Definition: fxpkgfdo.hpp:40
VOID HandleQueryCapabilitiesCompletion(__inout FxIrp *Irp)
Definition: fxpkgfdo.cpp:613
static _Must_inspect_result_ NTSTATUS _PnpQueryPnpDeviceStateCompletionRoutine(__in MdDeviceObject DeviceObject, __inout MdIrp Irp, __inout PVOID Context)
Definition: fxpkgfdokm.cpp:288
virtual VOID DeleteSymbolicLinkOverload(__in BOOLEAN GracefulRemove)
Definition: fxpkgfdo.cpp:1280
static _Must_inspect_result_ NTSTATUS _PowerPassDown(__inout FxPkgPnp *This, __in FxIrp *Irp)
Definition: fdopower.cpp:43
virtual VOID ReleaseReenumerationInterface(VOID)
Definition: fxpkgfdo.cpp:1356
_Must_inspect_result_ NTSTATUS DispatchDeviceSetPower(__in FxIrp *Irp)
Definition: fdopower.cpp:299
static const PFN_PNP_POWER_CALLBACK m_FdoPnpFunctionTable[IRP_MN_SURPRISE_REMOVAL+1]
Definition: fxpkgfdo.hpp:74
_Must_inspect_result_ NTSTATUS CreateDefaultDeviceList(__in PWDF_CHILD_LIST_CONFIG ListConfig, __in PWDF_OBJECT_ATTRIBUTES ListAttributes)
Definition: fxpkgfdo.cpp:816
static _Must_inspect_result_ NTSTATUS _DispatchSetPower(__inout FxPkgPnp *This, __in FxIrp *Irp)
Definition: fdopower.cpp:90
_Must_inspect_result_ NTSTATUS PnpFilterResourceRequirements(__inout FxIrp *Irp)
Definition: fxpkgfdokm.cpp:43
virtual BOOLEAN PnpSendStartDeviceDownTheStackOverload(VOID)
Definition: fxpkgfdo.cpp:919
virtual WDF_DEVICE_PNP_STATE PnpGetPostRemoveState(VOID)
Definition: fxpkgfdo.cpp:1197
static MdCompletionRoutineType _SystemPowerS0Completion
Definition: fxpkgfdo.hpp:461
_Must_inspect_result_ NTSTATUS RegisterCallbacks(__in PWDF_FDO_EVENT_CALLBACKS DispatchTable)
Definition: fxpkgfdo.cpp:796
static _Must_inspect_result_ NTSTATUS _PnpSurpriseRemoval(__inout FxPkgPnp *This, __inout FxIrp *Irp)
Definition: fxpkgfdo.cpp:345
virtual WDF_DEVICE_PNP_STATE PnpEventPdoRemovedOverload(VOID)
Definition: fxpkgfdo.cpp:1167
_Must_inspect_result_ NTSTATUS PostCreateDeviceInitialize(VOID)
Definition: fxpkgfdo.cpp:1524
FxChildList * m_StaticDeviceList
Definition: fxpkgfdo.hpp:42
FxIoTarget * m_DefaultTarget
Definition: fxpkgfdo.hpp:47
static MdCompletionRoutineType _SystemPowerSxCompletion
Definition: fxpkgfdo.hpp:465
virtual _Must_inspect_result_ NTSTATUS ProcessRemoveDeviceOverload(__inout FxIrp *Irp)
Definition: fxpkgfdo.cpp:1250
virtual const PFN_PNP_POWER_CALLBACK * GetDispatchPower(VOID)
Definition: fxpkgfdo.hpp:437
_Must_inspect_result_ NTSTATUS PnpQueryCapabilities(__inout FxIrp *Irp)
Definition: fxpkgfdokm.cpp:244
virtual _Must_inspect_result_ NTSTATUS PowerCheckParentOverload(__out BOOLEAN *ParentOn)
Definition: fdopower.cpp:543
static _Must_inspect_result_ NTSTATUS _PnpQueryPnpDeviceState(__inout FxPkgPnp *This, __inout FxIrp *Irp)
Definition: fxpkgfdokm.cpp:305
_Must_inspect_result_ NTSTATUS DispatchSystemSetPower(__in FxIrp *Irp)
Definition: fdopower.cpp:236
virtual const PFN_PNP_POWER_CALLBACK * GetDispatchPnp(VOID)
Definition: fxpkgfdo.hpp:428
virtual VOID PowerParentPowerDereference(VOID)
Definition: fdopower.cpp:569
static MdCompletionRoutineType RaiseDevicePowerCompletion
Definition: fxpkgfdo.hpp:454
virtual _Must_inspect_result_ NTSTATUS AskParentToRemoveAndReenumerate(VOID)
Definition: fxpkgfdokm.cpp:567
static _Must_inspect_result_ NTSTATUS _PnpQueryInterface(__inout FxPkgPnp *This, __inout FxIrp *Irp)
Definition: fxpkgfdo.cpp:490
static _Must_inspect_result_ NTSTATUS _PnpPassDown(__in FxPkgPnp *This, __inout FxIrp *Irp)
Definition: fxpkgfdo.cpp:307
static _Must_inspect_result_ NTSTATUS _DispatchQueryPower(__inout FxPkgPnp *This, __in FxIrp *Irp)
Definition: fdopower.cpp:123
VOID HandleQueryCapabilities(__inout FxIrp *Irp)
Definition: fxpkgfdo.cpp:572
_Must_inspect_result_ NTSTATUS LowerDevicePower(__in FxIrp *Irp)
Definition: fdopower.cpp:401
_Must_inspect_result_ NTSTATUS QueryForDsfInterface(VOID)
Definition: fxpkgfdokm.cpp:455
virtual _Must_inspect_result_ NTSTATUS SendIrpSynchronously(__inout FxIrp *Irp)
Definition: fxpkgfdo.cpp:248
_In_ PIRP Irp
Definition: csq.h:116
#define __in
Definition: dbghelp.h:35
#define __deref_out
Definition: dbghelp.h:26
#define __inout
Definition: dbghelp.h:50
#define __out
Definition: dbghelp.h:62
#define TRUE
Definition: types.h:120
PFX_DRIVER_GLOBALS pGlobals
_Must_inspect_result_ NTSTATUS(* PFN_PNP_POWER_CALLBACK)(__inout FxPkgPnp *This, __inout FxIrp *Irp)
Definition: fxpkgpnp.hpp:225
#define _Must_inspect_result_
Definition: ms_sal.h:558
IWudfIrp * MdIrp
Definition: mxum.h:103
WUDF_IO_COMPLETION_ROUTINE MdCompletionRoutineType
Definition: mxum.h:142
#define IRP_MN_SURPRISE_REMOVAL
Definition: ntifs_ex.h:408
WDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER Header
Definition: fxpkgfdo.hpp:29
#define STDCALL
Definition: wdf.h:45
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474
_In_ PWDFDEVICE_INIT DeviceInit
Definition: wdfcontrol.h:113
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
enum _WDF_DEVICE_POWER_STATE WDF_DEVICE_POWER_STATE
enum _WDF_DEVICE_PNP_STATE WDF_DEVICE_PNP_STATE
_In_ PWDFDEVICE_INIT _In_ PWDF_PDO_EVENT_CALLBACKS DispatchTable
Definition: wdfpdo.h:248
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:413
#define IRP_MN_QUERY_POWER
static void Initialize()
Definition: xlate.c:212