ReactOS 0.4.15-dev-8241-g63935f8
supportum.cpp File Reference
#include "../pnppriv.hpp"
Include dependency graph for supportum.cpp:

Go to the source code of this file.

Functions

VOID CopyQueryInterfaceToIrpStack (__in PPOWER_THREAD_INTERFACE PowerThreadInterface, __in FxIrp *Irp)
 
_Must_inspect_result_ NTSTATUS GetStackCapabilities (__in PFX_DRIVER_GLOBALS DriverGlobals, __in MxDeviceObject *DeviceInStack, __in_opt PD3COLD_SUPPORT_INTERFACE D3ColdInterface, __out PSTACK_DEVICE_CAPABILITIES Capabilities)
 
VOID SetD3ColdSupport (__in PFX_DRIVER_GLOBALS DriverGlobals, __in MxDeviceObject *DeviceInStack, __in PD3COLD_SUPPORT_INTERFACE D3ColdInterface, __in BOOLEAN UseD3Cold)
 
_Must_inspect_result_ NTSTATUS SendDeviceUsageNotification (__in MxDeviceObject *RelatedDevice, __inout FxIrp *RelatedIrp, __in MxWorkItem *Workitem, __in FxIrp *OriginalIrp, __in BOOLEAN Revert)
 

Variables

PVOID GetIoMgrObjectForWorkItemAllocation (VOID)
 

Function Documentation

◆ CopyQueryInterfaceToIrpStack()

VOID CopyQueryInterfaceToIrpStack ( __in PPOWER_THREAD_INTERFACE  PowerThreadInterface,
__in FxIrp Irp 
)

Definition at line 27 of file supportum.cpp.

31{
32 UNREFERENCED_PARAMETER(PowerThreadInterface);
34
35 ASSERTMSG("Not implemented for UMDF\n", FALSE);
36}
_In_ PIRP Irp
Definition: csq.h:116
#define FALSE
Definition: types.h:117
#define ASSERTMSG(msg, exp)
Definition: nt_native.h:431
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317

◆ GetStackCapabilities()

_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 at line 40 of file supportum.cpp.

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}
LONG NTSTATUS
Definition: precomp.h:26
__inline MdDeviceObject GetObject(VOID)
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 STATUS_SUCCESS
Definition: shellext.h:65
HRESULT hr
Definition: shlfolder.c:183
Definition: ps.c:97

◆ SendDeviceUsageNotification()

_Must_inspect_result_ NTSTATUS SendDeviceUsageNotification ( __in MxDeviceObject RelatedDevice,
__inout FxIrp RelatedIrp,
__in MxWorkItem Workitem,
__in FxIrp OriginalIrp,
__in BOOLEAN  Revert 
)

Definition at line 130 of file supportum.cpp.

137{
138 UNREFERENCED_PARAMETER(RelatedDevice);
139 UNREFERENCED_PARAMETER(RelatedIrp);
140 UNREFERENCED_PARAMETER(Workitem);
143
144 ASSERTMSG("Not implemented for UMDF\n", FALSE);
145
147}
_In_ PTRANSFER_PACKET _In_ ULONG _In_ PIRP OriginalIrp
Definition: classp.h:1757
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:239

◆ SetD3ColdSupport()

VOID SetD3ColdSupport ( __in PFX_DRIVER_GLOBALS  DriverGlobals,
__in MxDeviceObject DeviceInStack,
__in PD3COLD_SUPPORT_INTERFACE  D3ColdInterface,
__in BOOLEAN  UseD3Cold 
)

Definition at line 78 of file supportum.cpp.

84{
86 IWudfDeviceStack* deviceStack;
87
89 UNREFERENCED_PARAMETER(D3ColdInterface);
90
91 deviceObject = DeviceInStack->GetObject();
92 deviceStack = deviceObject->GetDeviceStackInterface();
93
94 deviceStack->SetD3ColdSupport(UseD3Cold);
95}

Variable Documentation

◆ GetIoMgrObjectForWorkItemAllocation

PVOID GetIoMgrObjectForWorkItemAllocation(VOID) ( VOID  )

Definition at line 98 of file supportum.cpp.

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}
#define NULL
Definition: types.h:112

Referenced by FxWorkItemEventQueue::Init().