Export (0) Print
Expand All
Expand Minimize
8 out of 11 rated this helpful - Rate this topic

Power Management Functions

The following functions are used with power management.

FunctionDescription
CallNtPowerInformation Sets or retrieves power information.
DevicePowerClose Frees all nodes in the device list and destroys the device list.
DevicePowerEnumDevices Enumerates devices on the system that meet the specified criteria.
DevicePowerOpen Initializes a device list by querying all the devices.
DevicePowerSetDeviceState Modifies the specified data on the specified device.
GetCurrentPowerPolicies Retrieves the current system power policy settings.
GetDevicePowerState Retrieves the current power state of the specified device.
GetPwrCapabilities Retrieves information about the system power capabilities.
GetSystemPowerStatus Retrieves the power status of the system.
IsSystemResumeAutomatic Indicates the current state of the computer.
PowerCanRestoreIndividualDefaultPowerScheme Determines if the current user has access to the data for the specified power scheme so that it could be restored if necessary.
PowerClearRequest Decrements the count of power requests of the specified type for a power request object.
PowerCreatePossibleSetting Creates a possible setting value for a specified power setting.
PowerCreateRequest Creates a power request object.
PowerCreateSetting Creates a setting value for a specified power setting.
PowerDeleteScheme Deletes a specified scheme from the database.
PowerDeterminePlatformRole Determines the computer role.
PowerDuplicateScheme Duplicates an existing power scheme.
PowerEnumerate Enumerates the specified elements in a power scheme.
PowerGetActiveScheme Retrieves the active power scheme.
PowerImportPowerScheme Imports a power scheme from a file.
PowerIsSettingRangeDefined Queries whether the specified power setting represents a range of possible values.
PowerReadACDefaultIndex Retrieves the default AC index of the specified power setting.
PowerReadACValue Retrieves the AC power value for the specified power setting.
PowerReadACValueIndex Retrieves the AC index of the specified power setting.
PowerReadDCDefaultIndex Retrieves the default DC index of the specified power setting.
PowerReadDCValue Retrieves the DC power value for the specified power setting.
PowerReadDCValueIndex Retrieves the DC value index of the specified power setting.
PowerReadDescription Retrieves the description for the specified power setting, subgroup, or scheme.
PowerReadFriendlyName Retrieves the friendly name for the specified power setting, subgroup, or scheme.
PowerReadIconResourceSpecifier Retrieves the icon resource for the specified power setting, subgroup, or scheme.
PowerReadPossibleDescription Retrieves the description for one of the possible choices of a power setting value.
PowerReadPossibleFriendlyName Retrieves the friendly name for one of the possible choices of a power setting value.
PowerReadPossibleValue Retrieves the value for a possible value of a power setting.
PowerReadSettingAttributes Returns the current attribute of the specified power setting.
PowerReadValueIncrement Retrieves the increment for valid values between the power settings minimum and maximum.
PowerReadValueMax Retrieves the maximum value for the specified power setting.
PowerReadValueMin Retrieves the minimum value for the specified power setting.
PowerReadValueUnitsSpecifier Reads the string used to describe the units of a power setting that supports a range of values.
PowerRegisterSuspendResumeNotification Registers to receive notification when the system is suspended or resumed.
PowerRemovePowerSetting Deletes the specified power setting.
PowerReplaceDefaultPowerSchemes Replaces the power schemes for the default user with the current user's power schemes.
PowerRestoreDefaultPowerSchemes Replaces the power schemes for the current user with ones for the default user.
PowerRestoreIndividualDefaultPowerScheme Replaces a specific power scheme for the current user with one from the default user.
PowerSetActiveScheme Sets the active power scheme for the current user.
PowerSetRequest Increments the count of power requests of the specified type for a power request object.
PowerSettingAccessCheck Queries for a group policy override for specified power settings.
PowerSettingAccessCheckEx Queries for a group policy override for specified power settings and specifies the requested access for the setting.
PowerSettingRegisterNotification Registers to receive notification when a power setting changes.
PowerSettingUnregisterNotification Cancels a registration to receive notification when a power setting changes.
PowerUnregisterSuspendResumeNotification Cancels a registration to receive notification when the system is suspended or resumed.
PowerWriteACDefaultIndex Sets the default AC index of the specified power setting.
PowerWriteACValueIndex Sets the AC value index of the specified power setting.
PowerWriteDCDefaultIndex Sets the default DC index of the specified power setting.
PowerWriteDCValueIndex Sets the DC index of the specified power setting.
PowerWriteDescription Sets the description for the specified power setting, subgroup, or scheme.
PowerWriteFriendlyName Sets the friendly name for the specified power setting, subgroup, or scheme.
PowerWriteIconResourceSpecifier Sets the icon resource for the specified power setting, subgroup, or scheme.
PowerWritePossibleDescription Sets the description for one of the possible choices of a power setting value.
PowerWritePossibleFriendlyName Sets the friendly name for the specified possible setting of a power setting.
PowerWritePossibleValue Sets the value for a possible value of a power setting.
PowerWriteSettingAttributes Sets the power attributes of a power key.
PowerWriteValueIncrement Sets the increment for valid values between the power settings minimum and maximum.
PowerWriteValueMax Sets the maximum value for the specified power setting.
PowerWriteValueMin Sets the minimum value for the specified power setting.
PowerWriteValueUnitsSpecifier Writes the string used to describe the units of a power setting that supports a range of values.
RegisterPowerSettingNotification Registers the application to receive power setting notifications for the specific power setting event.
RegisterSuspendResumeNotification Registers to receive notification when the system is suspended or resumed. Similar to PowerRegisterSuspendResumeNotification, but operates in user mode and can take a window handle.
SetSuspendState Sets the system suspend state.
SetThreadExecutionState Enables applications to inform the system that it is in use.
UnregisterPowerSettingNotification Unregisters the power setting notification.
UnregisterSuspendResumeNotification Cancels a registration to receive notification when the system is suspended or resumed. Similar to PowerUnregisterSuspendResumeNotification but operates in user mode.

 

Power Management Functions: Windows Server 2003 and Earlier

The following functions are supported in Windows Server 2008, Windows Vista, and later versions of Windows for compatibility with earlier versions of Windows. Applications written for Windows Server 2008, Windows Vista and later should use the alternatives listed in this table.

Windows Server 2003 and earlierDescriptionWindows Server 2008 and Windows Vista
CanUserWritePwrScheme Determines whether the current user has sufficient privilege to write a power scheme. PowerSettingAccessCheck
DeletePwrScheme Deletes the specified power scheme. PowerDeleteScheme
EnumPwrSchemes Enumerates all power schemes. PowerEnumerate
GetActivePwrScheme Retrieves the index of the active power scheme. PowerGetActiveScheme
GetPwrDiskSpindownRange Retrieves the disk spindown range.Controlled through the GUID_DISK_SUBGROUP power settings subgroup. Use the PowerEnumerate function to enumerate individual settings.
IsPwrHibernateAllowed Determines whether the computer supports hibernation. GetPwrCapabilities
IsPwrShutdownAllowed Determines whether the computer supports the soft off power state.Not applicable. Starting with Windows Vista, computers must support soft off.
IsPwrSuspendAllowed Determines whether the computer supports the sleep states. GetPwrCapabilities
ReadGlobalPwrPolicy Retrieves the current global power policy settings.Power read functions
ReadProcessorPwrScheme Retrieves the processor power policy settings for the specified power scheme.Controlled through the GUID_PROCESSOR_SETTINGS_SUBGROUP power settings subgroup. Use the PowerEnumerate function to enumerate individual settings.
ReadPwrScheme Retrieves the power policy settings that are unique to the specified power scheme.Power read functions
RequestWakeupLatency Specifies roughly how quickly the computer should enter the working state.Not applicable.
SetActivePwrScheme Sets the active power scheme. PowerSetActiveScheme
SetSystemPowerState Suspends the system by shutting power down. SetSuspendState
WriteGlobalPwrPolicy Writes global power policy settings.Power write functions
WriteProcessorPwrScheme Writes processor power policy settings for the specified power scheme.Controlled through the GUID_PROCESSOR_SETTINGS_SUBGROUP power settings subgroup. Use the PowerEnumerate function to enumerate individual settings.
WritePwrScheme Writes policy settings that are unique to the power scheme.Power write functions

 

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.