ReactOS  0.4.15-dev-2700-g4b4ffa9
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(),
230  TRACINGPNP,
231  "WDFDEVICE 0x%p !devobj 0x%p PO_FX_POWER_CONTROL_CALLBACK invoked.",
232  pThis->m_PkgPnp->GetDevice()->GetHandle(),
233  pThis->m_PkgPnp->GetDevice()->GetDeviceObject()
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,
254  InBufferSize,
255  OutBuffer,
257  BytesReturned);
258 
260  pThis->m_PkgPnp->GetDriverGlobals(),
262  TRACINGPNP,
263  "WDFDEVICE 0x%p !devobj 0x%p Client driver's "
264  "PO_FX_POWER_CONTROL_CALLBACK returned %!STATUS!.",
265  pThis->m_PkgPnp->GetDevice()->GetHandle(),
266  pThis->m_PkgPnp->GetDevice()->GetDeviceObject(),
267  status
268  );
269 
270  return status;
271 }
__inline CfxDevice * GetDevice(VOID)
Definition: fxpackage.hpp:46
MdDeviceObject __inline GetDeviceObject(VOID)
Definition: fxdevice.hpp:174
_In_ UCHAR _In_ ULONG _Out_ PUCHAR _Outptr_result_bytebuffer_ OutBufferLength PVOID * OutBuffer
Definition: scsi.h:4071
WDFDEVICE __inline GetHandle(VOID)
Definition: fxdevice.hpp:237
LONG NTSTATUS
Definition: precomp.h:26
_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:1039
#define TRACE_LEVEL_VERBOSE
Definition: storswtr.h:30
_In_ LPCGUID PowerControlCode
Definition: potypes.h:545
struct _POX_SETTINGS * GetPowerFrameworkSettings(VOID)
_In_ ULONG InBufferSize
Definition: wdfwmi.h:106
#define ASSERT(a)
Definition: mode.c:44
_In_ ULONG OutBufferSize
Definition: wdfwmi.h:87
#define TRACINGPNP
Definition: dbgtrace.h:67
__inline PFX_DRIVER_GLOBALS GetDriverGlobals(VOID)
Definition: fxobject.hpp:734
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGPNP, "Enter, WDFDEVICE %p", Device)
#define NULL
Definition: types.h:112
FxPkgPnp * m_PkgPnp
static SERVICE_STATUS status
Definition: service.c:31
Definition: ps.c:97