ReactOS 0.4.15-dev-7842-g558ab78
poxinterfacekm.cpp File Reference
#include "pnppriv.hpp"
#include <initguid.h>
#include <wdmguid.h>
Include dependency graph for poxinterfacekm.cpp:

Go to the source code of this file.

Functions

 _Function_class_ (PO_FX_POWER_CONTROL_CALLBACK) _IRQL_requires_max_(DISPATCH_LEVEL) NTSTATUS FxPoxInterface
 

Function Documentation

◆ _Function_class_()

_Function_class_ ( PO_FX_POWER_CONTROL_CALLBACK  )

Definition at line 208 of file poxinterfacekm.cpp.

220{
222 PPOX_SETTINGS poxSettings = NULL;
223 FxPoxInterface * pThis = NULL;
224
225 pThis = (FxPoxInterface*) Context;
226
228 pThis->m_PkgPnp->GetDriverGlobals(),
231 "WDFDEVICE 0x%p !devobj 0x%p PO_FX_POWER_CONTROL_CALLBACK invoked.",
232 pThis->m_PkgPnp->GetDevice()->GetHandle(),
234 );
235
236 //
237 // If the client driver has specified power framework settings, retrieve
238 // them.
239 //
240 poxSettings = pThis->GetPowerFrameworkSettings();
241
242 //
243 // The client driver must have specified a power control callback
244 //
245 ASSERT((NULL != poxSettings) &&
246 (NULL != poxSettings->PowerControlCallback));
247
248 //
249 // Invoke the client driver's power control callback
250 //
251 status = poxSettings->PowerControlCallback(poxSettings->PoFxDeviceContext,
253 InBuffer,
255 OutBuffer,
258
260 pThis->m_PkgPnp->GetDriverGlobals(),
263 "WDFDEVICE 0x%p !devobj 0x%p Client driver's "
264 "PO_FX_POWER_CONTROL_CALLBACK returned %!STATUS!.",
265 pThis->m_PkgPnp->GetDevice()->GetHandle(),
267 status
268 );
269
270 return status;
271}
LONG NTSTATUS
Definition: precomp.h:26
WDFDEVICE __inline GetHandle(VOID)
Definition: fxdevice.hpp:237
MdDeviceObject __inline GetDeviceObject(VOID)
Definition: fxdevice.hpp:174
__inline PFX_DRIVER_GLOBALS GetDriverGlobals(VOID)
Definition: fxobject.hpp:734
__inline CfxDevice * GetDevice(VOID)
Definition: fxpackage.hpp:46
struct _POX_SETTINGS * GetPowerFrameworkSettings(VOID)
FxPkgPnp * m_PkgPnp
#define TRACINGPNP
Definition: dbgtrace.h:67
#define NULL
Definition: types.h:112
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGPNP, "Enter, WDFDEVICE %p", Device)
#define ASSERT(a)
Definition: mode.c:44
_In_ UCHAR _In_ ULONG _Out_ PUCHAR _Outptr_result_bytebuffer_ OutBufferLength PVOID * OutBuffer
Definition: scsi.h:4071
#define TRACE_LEVEL_VERBOSE
Definition: storswtr.h:30
PPO_FX_POWER_CONTROL_CALLBACK PowerControlCallback
Definition: ps.c:97
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_ ULONG _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_opt_ PULONG_PTR BytesReturned
Definition: wdfiotarget.h:1052
_In_ ULONG OutBufferSize
Definition: wdfwmi.h:87
_In_ ULONG InBufferSize
Definition: wdfwmi.h:106
_In_ LPCGUID PowerControlCode
Definition: potypes.h:545