Поделиться через


PlatformMapPowerStateHint (Compact 2013)

3/26/2014

This function maps the system power state hint values to known system power states maintained in the system registry.

Syntax

DWORD WINAPI PlatformMapPowerStateHint(
  DWORD dwHint,
  LPSTR pszBuf,
  DWORD dwBufChars
);

Parameters

  • dwHint
    Hint flag associated with the system power state.
  • pszBuf
    Mapped system power state name.
  • dwBufChars
    Number of characters in pszBuf.

Return Value

  • ERROR_SUCCESS
    Indicates success.
  • Win32 error code
    Used for all other errors.

Remarks

An application can invoke system power state transitions without using explicit state names. For example, SetSystemPowerState(NULL, POWER_STATE_SUSPEND, 0) directs Power Manager to transition the system into the appropriate suspend system power state. When unnamed state transitions are requested in this fashion, the model device driver (MDD) calls PlatformMapPowerStateHint to receive the name of the most appropriate system power state. For example, POWER_STATE_SUSPEND may map to a system power state named Suspend. In a more complex system, it may map to SuspendBattery or SuspendAC, depending on whether the system is currently running on battery or AC power.

Requirements

Header

pmimpl.h

See Also

Reference

Power Management Functions