ReactOS  0.4.15-dev-3181-g4acf100
fxdefaultirphandler.cpp
Go to the documentation of this file.
1 /*++
2 
3 Copyright (c) Microsoft Corporation
4 
5 Module Name:
6 
7  FxDefaultIrpHandler.cpp
8 
9 Abstract:
10 
11  This module implements the default handler for IRPs that WDF does not handle
12  automatically for an FxDevice
13 
14 Author:
15 
16 
17 
18 Environment:
19 
20  Both kernel and user mode
21 
22 Revision 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 
34 extern "C" {
35 #include "mx.h"
36 }
37 #include "fxmin.hpp"
38 
39 extern "C" {
40 // #include "FxDefaultIrpHandler.tmh"
41 }
42 
44  __in PFX_DRIVER_GLOBALS FxDriverGlobals,
46  ) :
48 {
49 }
50 
54  __in MdIrp Irp
55  )
56 {
57  UCHAR major, minor;
58  FxIrp fxIrp(Irp);
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 }
CfxDevice * m_Device
Definition: fxobject.hpp:329
MdRemoveLock GetRemoveLock(VOID)
Definition: fxdevicekm.hpp:47
VOID SetStatus(__in NTSTATUS Status)
Definition: fxirpum.cpp:457
virtual _Must_inspect_result_ NTSTATUS Dispatch(__in MdIrp Irp)
LONG NTSTATUS
Definition: precomp.h:26
Definition: fxirp.hpp:28
#define STATUS_INVALID_DEVICE_REQUEST
Definition: udferr_usr.h:138
FxDefaultIrpHandler(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in CfxDevice *Device)
_In_ PIRP Irp
Definition: csq.h:116
VOID SkipCurrentIrpStackLocation(VOID)
Definition: fxirpum.cpp:400
ULONG major
NTSTATUS CallDriver(__in MdDeviceObject DeviceObject)
Definition: fxirpum.cpp:36
VOID StartNextPowerIrp()
Definition: fxirpum.cpp:61
MdDeviceObject __inline GetAttachedDevice(VOID)
Definition: fxdevice.hpp:210
IWudfIrp * MdIrp
Definition: mxum.h:103
__inline BOOLEAN IsFilter()
Definition: fxdevice.hpp:1408
VOID CompleteRequest(__in_opt CCHAR PriorityBoost=IO_NO_INCREMENT)
Definition: fxirpum.cpp:24
VOID SetInformation(__in ULONG_PTR Information)
Definition: fxirpum.cpp:504
unsigned char UCHAR
Definition: xmlstorage.h:181
#define IRP_MJ_POWER
#define _Must_inspect_result_
Definition: ms_sal.h:558
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474
static __inline VOID MxReleaseRemoveLock(__in MdRemoveLock RemoveLock, __in PVOID Tag)
Definition: mxgeneralkm.h:278
static FxDeviceRemLockAction __inline _RequiresRemLock(__in UCHAR MajorCode, __in UCHAR MinorCode)
Definition: fxdevice.hpp:933
FxIrp fxIrp(Irp)
UCHAR GetMinorFunction(VOID)
Definition: fxirpum.cpp:297
#define IO_NO_INCREMENT
Definition: iotypes.h:598
UCHAR GetMajorFunction(VOID)
Definition: fxirpum.cpp:217
#define __in
Definition: dbghelp.h:35
ULONG minor