ReactOS 0.4.16-dev-92-g0c2cdca
fxdefaultirphandler.cpp
Go to the documentation of this file.
1/*++
2
3Copyright (c) Microsoft Corporation
4
5Module Name:
6
7 FxDefaultIrpHandler.cpp
8
9Abstract:
10
11 This module implements the default handler for IRPs that WDF does not handle
12 automatically for an FxDevice
13
14Author:
15
16
17
18Environment:
19
20 Both kernel and user mode
21
22Revision History:
23
24--*/
25
26#if ((FX_CORE_MODE)==(FX_CORE_USER_MODE))
27#define FX_IS_USER_MODE (TRUE)
28#define FX_IS_KERNEL_MODE (FALSE)
29#elif ((FX_CORE_MODE)==(FX_CORE_KERNEL_MODE))
30#define FX_IS_USER_MODE (FALSE)
31#define FX_IS_KERNEL_MODE (TRUE)
32#endif
33
34extern "C" {
35#include "mx.h"
36}
37#include "fxmin.hpp"
38
39extern "C" {
40// #include "FxDefaultIrpHandler.tmh"
41}
42
44 __in PFX_DRIVER_GLOBALS FxDriverGlobals,
46 ) :
48{
49}
50
55 )
56{
59
62
64 if (major == IRP_MJ_POWER) {
65 //
66 // Required to be called before the power irp is completed
67 //
69 }
70
73
75
76 //
77 // If we are in this function, m_Device is still valid, so we can use it
78 // to get the WDM remove lock and not have to get it out of the
79 // device object from current irp stack location.
80 //
82
84 }
85
86 if (m_Device->IsFilter()) {
89 }
90 else {
93
96 }
97}
LONG NTSTATUS
Definition: precomp.h:26
virtual _Must_inspect_result_ NTSTATUS Dispatch(__in MdIrp Irp)
FxDefaultIrpHandler(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in CfxDevice *Device)
MdDeviceObject __inline GetAttachedDevice(VOID)
Definition: fxdevice.hpp:210
static FxDeviceRemLockAction __inline _RequiresRemLock(__in UCHAR MajorCode, __in UCHAR MinorCode)
Definition: fxdevice.hpp:933
MdRemoveLock GetRemoveLock(VOID)
Definition: fxdevicekm.hpp:47
__inline BOOLEAN IsFilter()
Definition: fxdevice.hpp:1408
Definition: fxirp.hpp:28
UCHAR GetMajorFunction(VOID)
Definition: fxirpum.cpp:217
VOID CompleteRequest(__in_opt CCHAR PriorityBoost=IO_NO_INCREMENT)
Definition: fxirpum.cpp:24
VOID StartNextPowerIrp()
Definition: fxirpum.cpp:61
VOID SkipCurrentIrpStackLocation(VOID)
Definition: fxirpum.cpp:400
VOID SetStatus(__in NTSTATUS Status)
Definition: fxirpum.cpp:457
VOID SetInformation(__in ULONG_PTR Information)
Definition: fxirpum.cpp:504
UCHAR GetMinorFunction(VOID)
Definition: fxirpum.cpp:297
NTSTATUS CallDriver(__in MdDeviceObject DeviceObject)
Definition: fxirpum.cpp:36
CfxDevice * m_Device
Definition: fxobject.hpp:329
static __inline VOID MxReleaseRemoveLock(__in MdRemoveLock RemoveLock, __in PVOID Tag)
Definition: mxgeneralkm.h:278
_In_ PIRP Irp
Definition: csq.h:116
#define __in
Definition: dbghelp.h:35
@ FxDeviceRemLockRequired
Definition: fxdevice.hpp:80
FxIrp fxIrp(Irp)
@ FX_TYPE_DEFAULT_IRP_HANDLER
Definition: fxtypes.h:97
#define _Must_inspect_result_
Definition: ms_sal.h:558
IWudfIrp * MdIrp
Definition: mxum.h:103
#define minor(rdev)
Definition: propsheet.cpp:929
#define major(rdev)
Definition: propsheet.cpp:928
#define STATUS_INVALID_DEVICE_REQUEST
Definition: udferr_usr.h:138
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474
#define IO_NO_INCREMENT
Definition: iotypes.h:598
#define IRP_MJ_POWER
unsigned char UCHAR
Definition: xmlstorage.h:181