IPortClsRuntimePower::RegisterPowerControlCallback method (portcls.h)

The port class driver (PortCls) uses the RegisterPowerControlCallback method to register a power control callback.

Syntax

NTSTATUS RegisterPowerControlCallback(
  [in]           PDEVICE_OBJECT                      _DeviceObject,
  [in]           PCPFNRUNTIME_POWER_CONTROL_CALLBACK _Callback,
  [in, optional] PVOID                               _Context
);

Parameters

[in] _DeviceObject

The device object.

[in] _Callback

The callback object.

[in, optional] _Context

The callback context.

Return value

The RegisterPowerControlCallback method returns STATUS_SUCCESS, if the call is successful. Otherwise, it returns the appropriate error code.

Requirements

Requirement Value
Minimum supported client Windows 7
Minimum supported server Windows Server 2003
Target Platform Universal
Header portcls.h

See also

IPortClsRuntimePower