ReactOS  0.4.15-dev-3446-g30010a5
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)
 
PVOID GetIoMgrObjectForWorkItemAllocation (VOID)
 
_Must_inspect_result_ NTSTATUS SendDeviceUsageNotification (__in MxDeviceObject *RelatedDevice, __inout FxIrp *RelatedIrp, __in MxWorkItem *Workitem, __in FxIrp *OriginalIrp, __in BOOLEAN Revert)
 

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 }
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
#define FALSE
Definition: types.h:117
_In_ PIRP Irp
Definition: csq.h:116
#define ASSERTMSG(msg, exp)
Definition: nt_native.h:431

◆ GetIoMgrObjectForWorkItemAllocation()

PVOID GetIoMgrObjectForWorkItemAllocation ( 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

◆ 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 }
HRESULT hr
Definition: shlfolder.c:183
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
LONG NTSTATUS
Definition: precomp.h:26
IWudfDeviceStack * deviceStack
DriverGlobals
_Must_inspect_result_ typedef _Out_ PHIDP_CAPS Capabilities
Definition: hidclass.h:103
unsigned int BOOL
Definition: ntddk_ex.h:94
LONG HRESULT
Definition: typedefs.h:79
MxDeviceObject deviceObject
__inline MdDeviceObject GetObject(VOID)
#define S_OK
Definition: intsafe.h:52
#define STATUS_SUCCESS
Definition: shellext.h:65
static SERVICE_STATUS status
Definition: service.c:31
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);
142  UNREFERENCED_PARAMETER(Revert);
143 
144  ASSERTMSG("Not implemented for UMDF\n", FALSE);
145 
146  return STATUS_NOT_IMPLEMENTED;
147 }
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
return STATUS_NOT_IMPLEMENTED
#define FALSE
Definition: types.h:117
#define ASSERTMSG(msg, exp)
Definition: nt_native.h:431
_In_ PTRANSFER_PACKET _In_ ULONG _In_ PIRP OriginalIrp
Definition: classp.h:1757

◆ 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 }
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
IWudfDeviceStack * deviceStack
DriverGlobals
MxDeviceObject deviceObject
__inline MdDeviceObject GetObject(VOID)