ReactOS 0.4.15-dev-7924-g5949c20
supportum.cpp
Go to the documentation of this file.
1/*++
2
3Copyright (c) Microsoft Corporation
4
5Module Name:
6
7 supportUM.cpp
8
9Abstract:
10
11 This module implements the pnp support routines.
12
13Author:
14
15
16Environment:
17
18 User mode only
19
20Revision History:
21
22--*/
23
24#include "../pnppriv.hpp"
25
26VOID
28 __in PPOWER_THREAD_INTERFACE PowerThreadInterface,
30 )
31{
32 UNREFERENCED_PARAMETER(PowerThreadInterface);
34
35 ASSERTMSG("Not implemented for UMDF\n", FALSE);
36}
37
42 __in MxDeviceObject* DeviceInStack,
43 __in_opt PD3COLD_SUPPORT_INTERFACE D3ColdInterface,
45 )
46{
47 HRESULT hr;
50 IWudfDeviceStack* deviceStack;
51
53 UNREFERENCED_PARAMETER(D3ColdInterface);
54
55 deviceObject = DeviceInStack->GetObject();
56 deviceStack = deviceObject->GetDeviceStackInterface();
57
58 hr = deviceStack->GetStackCapabilities(Capabilities);
59
60 if (S_OK == hr) {
62 }
63 else {
64 PUMDF_VERSION_DATA driverVersion = deviceStack->GetMinDriverVersion();
65 BOOL preserveCompat =
66 deviceStack->ShouldPreserveIrpCompletionStatusCompatibility();
67
68 status = CHostFxUtil::NtStatusFromHr(hr,
69 driverVersion->MajorNumber,
70 driverVersion->MinorNumber,
71 preserveCompat);
72 }
73
74 return status;
75}
76
77VOID
80 __in MxDeviceObject* DeviceInStack,
81 __in PD3COLD_SUPPORT_INTERFACE D3ColdInterface,
82 __in BOOLEAN UseD3Cold
83 )
84{
86 IWudfDeviceStack* deviceStack;
87
89 UNREFERENCED_PARAMETER(D3ColdInterface);
90
91 deviceObject = DeviceInStack->GetObject();
92 deviceStack = deviceObject->GetDeviceStackInterface();
93
94 deviceStack->SetD3ColdSupport(UseD3Cold);
95}
96
99 VOID
100 )
101/*++
102Routine description:
103 Returns an IO manager object that can be passed in to IoAllocateWorkItem
104
105Arguments:
106 None
107
108Return value:
109 Pointer to the object that can be passed in to IoAllocateWorkItem
110--*/
111{
112 //
113 // In user-mode we don't need an IO manager object for work item allocation
114 // so we return NULL.
115 //
116 return NULL;
117}
118
121 VOID
122 )
123{
124
125 return TRUE;
126}
127
131 __in MxDeviceObject* RelatedDevice,
132 __inout FxIrp* RelatedIrp,
133 __in MxWorkItem* Workitem,
135 __in BOOLEAN Revert
136 )
137{
138 UNREFERENCED_PARAMETER(RelatedDevice);
139 UNREFERENCED_PARAMETER(RelatedIrp);
140 UNREFERENCED_PARAMETER(Workitem);
143
144 ASSERTMSG("Not implemented for UMDF\n", FALSE);
145
147}
148
149
unsigned char BOOLEAN
LONG NTSTATUS
Definition: precomp.h:26
Definition: fxirp.hpp:28
static BOOLEAN _SystemManagedIdleTimeoutAvailable(VOID)
Definition: supportkm.cpp:211
__inline MdDeviceObject GetObject(VOID)
_In_ PTRANSFER_PACKET _In_ ULONG _In_ PIRP OriginalIrp
Definition: classp.h:1757
_In_ PIRP Irp
Definition: csq.h:116
#define __in
Definition: dbghelp.h:35
#define __inout
Definition: dbghelp.h:50
#define __in_opt
Definition: dbghelp.h:38
#define __out
Definition: dbghelp.h:62
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
MxDeviceObject deviceObject
IWudfDeviceStack * deviceStack
DriverGlobals
_Must_inspect_result_ typedef _Out_ PHIDP_CAPS Capabilities
Definition: hidclass.h:103
#define S_OK
Definition: intsafe.h:52
#define _Must_inspect_result_
Definition: ms_sal.h:558
#define ASSERTMSG(msg, exp)
Definition: nt_native.h:431
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:239
#define STATUS_SUCCESS
Definition: shellext.h:65
HRESULT hr
Definition: shlfolder.c:183
Definition: ps.c:97
_Must_inspect_result_ NTSTATUS GetStackCapabilities(__in PFX_DRIVER_GLOBALS DriverGlobals, __in MxDeviceObject *DeviceInStack, __in_opt PD3COLD_SUPPORT_INTERFACE D3ColdInterface, __out PSTACK_DEVICE_CAPABILITIES Capabilities)
Definition: supportum.cpp:40
PVOID GetIoMgrObjectForWorkItemAllocation(VOID)
Definition: supportum.cpp:98
VOID CopyQueryInterfaceToIrpStack(__in PPOWER_THREAD_INTERFACE PowerThreadInterface, __in FxIrp *Irp)
Definition: supportum.cpp:27
VOID SetD3ColdSupport(__in PFX_DRIVER_GLOBALS DriverGlobals, __in MxDeviceObject *DeviceInStack, __in PD3COLD_SUPPORT_INTERFACE D3ColdInterface, __in BOOLEAN UseD3Cold)
Definition: supportum.cpp:78
_Must_inspect_result_ NTSTATUS SendDeviceUsageNotification(__in MxDeviceObject *RelatedDevice, __inout FxIrp *RelatedIrp, __in MxWorkItem *Workitem, __in FxIrp *OriginalIrp, __in BOOLEAN Revert)
Definition: supportum.cpp:130