Power Management Functions


Power Management Functions

The following functions are used with power management.

FunctionDescription
CallNtPowerInformationSets or retrieves power information.
DevicePowerCloseFrees all nodes in the device list and destroys the device list.
DevicePowerEnumDevicesEnumerates devices on the system that meet the specified criteria.
DevicePowerOpenInitializes a device list by querying all the devices.
DevicePowerSetDeviceStateModifies the specified data on the specified device.
GetCurrentPowerPoliciesRetrieves the current system power policy settings.
GetDevicePowerStateRetrieves the current power state of the specified device.
GetPwrCapabilitiesRetrieves information about the system power capabilities.
GetSystemPowerStatusRetrieves the power status of the system.
IsSystemResumeAutomaticIndicates the current state of the computer.
PowerCanRestoreIndividualDefaultPowerSchemeDetermines if the current user has access to the data for the specified power scheme so that it could be restored if necessary.
PowerClearRequestDecrements the count of power requests of the specified type for a power request object.
PowerCreatePossibleSettingCreates a possible setting value for a specified power setting.
PowerCreateRequestCreates a power request object.
PowerCreateSettingCreates a setting value for a specified power setting.
PowerDeleteSchemeDeletes a specified scheme from the database.
PowerDeterminePlatformRoleDetermines the computer role.
PowerDuplicateSchemeDuplicates an existing power scheme.
PowerEnumerateEnumerates the specified elements in a power scheme.
PowerGetActiveSchemeRetrieves the active power scheme.
PowerImportPowerSchemeImports a power scheme from a file.
PowerReadACDefaultIndexRetrieves the default AC index of the specified power setting.
PowerReadACValueRetrieves the AC power value for the specified power setting.
PowerReadACValueIndexRetrieves the AC index of the specified power setting.
PowerReadDCDefaultIndexRetrieves the default DC index of the specified power setting.
PowerReadDCValueRetrieves the DC power value for the specified power setting.
PowerReadDCValueIndexRetrieves the DC value index of the specified power setting.
PowerReadDescriptionRetrieves the description for the specified power setting, subgroup, or scheme.
PowerReadFriendlyNameRetrieves the friendly name for the specified power setting, subgroup, or scheme.
PowerReadIconResourceSpecifierRetrieves the icon resource for the specified power setting, subgroup, or scheme.
PowerReadPossibleDescriptionRetrieves the description for one of the possible choices of a power setting value.
PowerReadPossibleFriendlyNameRetrieves the friendly name for one of the possible choices of a power setting value.
PowerReadPossibleValueRetrieves the value for a possible value of a power setting.
PowerReadSettingAttributesReturns the current attribute of the specified power setting.
PowerReadValueIncrementRetrieves the increment for valid values between the power settings minimum and maximum.
PowerReadValueMaxRetrieves the maximum value for the specified power setting.
PowerReadValueMinRetrieves the minimum value for the specified power setting.
PowerReadValueUnitsSpecifierReads the string used to describe the units of a power setting that supports a range of values.
PowerRemovePowerSettingDeletes the specified power setting.
PowerReplaceDefaultPowerSchemesReplaces the power schemes for the default user with the current user's power schemes.
PowerRestoreDefaultPowerSchemesReplaces the power schemes for the current user with ones for the default user.
PowerRestoreIndividualDefaultPowerSchemeReplaces a specific power scheme for the current user with one from the default user.
PowerSetActiveSchemeSets the active power scheme for the current user.
PowerSetRequestIncrements the count of power requests of the specified type for a power request object.
PowerSettingAccessCheckQueries for a group policy override for specified power settings.
PowerWriteACDefaultIndexSets the default AC index of the specified power setting.
PowerWriteACValueIndexSets the AC value index of the specified power setting.
PowerWriteDCDefaultIndexSets the default DC index of the specified power setting.
PowerWriteDCValueIndexSets the DC index of the specified power setting.
PowerWriteDescriptionSets the description for the specified power setting, subgroup, or scheme.
PowerWriteFriendlyNameSets the friendly name for the specified power setting, subgroup, or scheme.
PowerWriteIconResourceSpecifierSets the icon resource for the specified power setting, subgroup, or scheme.
PowerWritePossibleDescriptionSets the description for one of the possible choices of a power setting value.
PowerWritePossibleFriendlyNameSets the friendly name for the specified possible setting of a power setting.
PowerWritePossibleValueSets the value for a possible value of a power setting.
PowerWriteSettingAttributesSets the power attributes of a power key.
PowerWriteValueIncrementSets the increment for valid values between the power settings minimum and maximum.
PowerWriteValueMaxSets the maximum value for the specified power setting.
PowerWriteValueMinSets the minimum value for the specified power setting.
PowerWriteValueUnitsSpecifierWrites the string used to describe the units of a power setting that supports a range of values.
RegisterPowerSettingNotificationRegisters the application to receive power setting notifications for the specific power setting event.
SetSuspendStateSets the system suspend state.
SetThreadExecutionStateEnables applications to inform the system that it is in use.
UnregisterPowerSettingNotificationUnregisters the power setting notification.

 

Power Management Functions: Windows Server 2003 and Earlier

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

Windows Server 2003 and earlierDescriptionWindows Server 2008 and Windows Vista
CanUserWritePwrSchemeDetermines whether the current user has sufficient privilege to write a power scheme.PowerSettingAccessCheck
DeletePwrSchemeDeletes the specified power scheme.PowerDeleteScheme
EnumPwrSchemesEnumerates all power schemes.PowerEnumerate
GetActivePwrSchemeRetrieves the index of the active power scheme.PowerGetActiveScheme
GetPwrDiskSpindownRangeRetrieves the disk spindown range.Controlled through the GUID_DISK_SUBGROUP power settings subgroup. Use the PowerEnumerate function to enumerate individual settings.
IsPwrHibernateAllowedDetermines whether the computer supports hibernation.GetPwrCapabilities
IsPwrShutdownAllowedDetermines whether the computer supports the soft off power state.Not applicable. Starting with Windows Vista, computers must support soft off.
IsPwrSuspendAllowedDetermines whether the computer supports the sleep states.GetPwrCapabilities
ReadGlobalPwrPolicyRetrieves the current global power policy settings.Power read functions
ReadProcessorPwrSchemeRetrieves 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.
ReadPwrSchemeRetrieves the power policy settings that are unique to the specified power scheme.Power read functions
RequestWakeupLatencySpecifies roughly how quickly the computer should enter the working state.Not applicable.
SetActivePwrSchemeSets the active power scheme.PowerSetActiveScheme
SetSystemPowerStateSuspends the system by shutting power down.SetSuspendState
WriteGlobalPwrPolicyWrites global power policy settings.Power write functions
WriteProcessorPwrSchemeWrites 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.
WritePwrSchemeWrites policy settings that are unique to the power scheme.Power write functions

 

Send comments about this topic to Microsoft

Build date: 11/19/2009

Tags :


Page view tracker