Share via


PowerPolicyNotify (Compact 2013)

3/26/2014

This function notifies Power Manager of the events required for implementing a power policy created by an OEM.

Syntax

BOOL PowerPolicyNotify(
  DWORD dwMessage,
  DWORD dwData
);

Parameters

  • dwMessage
    [in] Set to one of the predefined PPN_* values, or a custom value. The following table shows the possible values for dwMessage and the corresponding values for dwData.

    dwMessage

    Value

    dwData

    PPN_REEVALUATESTATE

    0x0001

    Reserved. Set dwData to zero.

    PPN_POWERCHANGE

    0x0002

    Reserved. Set dwData to zero.

    PPN_SUSPENDKEYPRESSED

    - or -

    PPN_POWERBUTTONPRESSED

    0x0004

    Reserved. Set dwData to zero.

    PPN_SUSPENDKEYRELEASED

    0x0005

    Reserved. Set dwData to zero.

    PPN_APPBUTTONPRESSED

    0x0006

    Reserved. Set dwData to zero.

    PPN_OEMBASE

    Greater than or equal to 0x10000.

    You can define higher values, such as 0x10001, 0x10002, and so on.

    Reserved. Set dwData to zero.

    These values are only revelant for OEM-modified power management.

  • dwData
    [in] 32-bit value that varies depending on the dwMessage value.

Return Value

TRUE indicates success.

FALSE indicates failure.

Remarks

PowerPolicyNotify should be called in the keyboard/keypad driver.

When PowerPolicyNotify is called, it causes a thread internal to Power Manager to call into Power Manager platform device driver (PDD). To force a power condition, you may need to configure the priority of this internal thread. Configure the priority of this thread in the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\SystemPriority256 registry key.

Requirements

Header

pmpolicy.h

See Also

Reference

Power Management Functions
PlatformManageSystemPower