PowerPolicyNotify (Windows CE 5.0)

Send Feedback

This function notifies the power manager of the events that are necessary in order to implement a power policy created by an OEM.

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 (0).
    PPN_POWERCHANGE 0x0002 Reserved. Set dwData to zero (0).
    PPN_SUSPENDKEYPRESSED

    - or -

    PPN_POWERBUTTONPRESSED

    0x0004 Reserved. Set dwData to zero (0).
    PPN_SUSPENDKEYRELEASED 0x0005 Reserved. Set dwData to zero (0).
    PPN_APPBUTTONPRESSED 0x0006 Reserved. Set dwData to zero (0).
    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 (0).

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

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

Return Values

Returns TRUE on success. FALSE on failure.

Remarks

When PowerPolicyNotify is called, it causes a thread internal to the Power Manager to call into the Power Manager's PDD. To force a power condition, you may need to configure the priority of this internal thread. Configure the priority of this thread under the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\SystemPriority256 registry key. For information about the default values of device driver threads, see Real-Time Priority System Levels.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Pmpolicy.h.
Link Library: Coredll.lib.

See Also

PlatformManageSystemPower | Power Management

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.