DEVICE_NOTIFY_CALLBACK_ROUTINE callback function (powrprof.h)

An application's DeviceNotifyCallbackRoutine callback function is used for receiving power notifications.

Syntax

DEVICE_NOTIFY_CALLBACK_ROUTINE DeviceNotifyCallbackRoutine;

ULONG DeviceNotifyCallbackRoutine(
  PVOID Context,
  ULONG Type,
  PVOID Setting
)
{...}

Parameters

Context

The context provided when registering for the power notification.

Type

The type of power event that caused this notification.

Setting

The value of this parameter depends on the type of notification subscribed to.

Return value

This function returns a Windows error code.

Requirements

Requirement Value
Minimum supported client Windows 8 [desktop apps only]
Minimum supported server Windows Server 2012 [desktop apps only]
Target Platform Windows
Header powrprof.h

See also

DEVICE_NOTIFY_SUBSCRIBE_PARAMETERS

PowerRegisterSuspendResumeNotification