• Upgrade your Internet Experience
  • Sign in
  • Microsoft.com
  • United States (English)
    Brasil (Português)Česká republika (Čeština)Deutschland (Deutsch)España (Español)France (Français)Italia (Italiano)Россия (Русский)대한민국 (한국어)中华人民共和国 (中文)台灣 (中文)日本 (日本語)香港特别行政區 (中文)
 
 
Windows Developer Center
 
 
Home
 
 
Library
 
 
Learn
 
 
Downloads
 
 
Support
 
 
Community
 
 
Forums
 
 
 
Windows Developer Center > Software Development for Windows Client Forums > General Windows Development Issues > Power Management API Issues in Windows Vista
Ask a questionAsk a question
Search Forums:
  • Search General Windows Development Issues Forum Search General Windows Development Issues Forum
  • Search All Software Development for Windows Client Forums Search All Software Development for Windows Client Forums
  • Search All MSDN Forums Search All MSDN Forums
 

AnswerPower Management API Issues in Windows Vista

  • Thursday, October 12, 2006 9:33 AMSS7E1983 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Vote As Helpful
    0
    In previous version of windows, we call "ReadProcessorPwrScheme()" to retrieve the processor power policy settings, then modify the DynamicThrottle field (may be PO_THROTTLE_ADAPTIVE, PO_THROTTLE_CONSTANT, PO_THROTTLE_DEGRADE or PO_THROTTLE_NONE) of ProcessorPolicyAC or ProcessorPolicyDC in MACHINE_PROCESSOR_POWER_POLICY structure, and set the new processor power policy with "WriteProcessorPwrScheme()" to switch the processor performance.

    But in Windows Vista, these two APIs are no longer available. Though the documentation says they are supported in Windows Vista, you may find that they can just be called in previous version of windows if you see their declaration in the header file "PowrProf.h".

    I also tried "CallNtPowerInfomation()" to retrieve processor information, processor power policy AC or DC, but never succeed.

    I wonder how I can control the processor throttle in Windows Vista as previous version of windows.

    Thanks

    • ReplyReply
    • QuoteQuote
     

Answers

  • Thursday, February 21, 2008 9:56 PMsrberard Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Vote As Helpful
    0

    Vista and Windows Server 2008 use a new power policy infrastructure and API.  This page details all the power APIs and indicates what is supported by the various Windows versions:

    http://msdn2.microsoft.com/en-us/library/aa373163(VS.85).aspx

     

    While some of the older APIs are supported in Vista, it is recommended that the new APIs be used on Vista and above.

     

    To give some background, in Vista a power plan (sometimes called a power scheme) contains the power setting values that are actually in effect on the system. A power plan is uniquely identified by a GUID and contains an AC and DC values for each power setting. There can only be one power plan active at a time on the system.  The current plan can be obtained using the PowerGetActiveScheme. 

     

    Like power plans, power settings are also identified by unique GUIDs and include a friendly name, description, allowable values, and default values for AC and DC.  Power setting values can be modified using the PowerWriteACValueIndex and PowerWriteDCValueIndex routines.  Note that PowerSetActiveScheme must be called after modifying any of the power settings in order to activate the new values.

     

    Specifically to your question, there are two settings that allow you to adjust the minimum and maximum state for processor power management.  These are expressed as a percentage of the maximum processor frequency.  Here is a summary of these two settings:

     

    Description

    Minimum processor performance state. The performance state is specified as a percentage of maximum processor frequency.

    GUID

    893dee8e-2bef-41e0-89c6-b55d0929964c

    PowerCfg Alias

    PROCTHROTTLEMIN

    Minimum Value

    0

    Maximum Value

    100

    Label

    Percentage (%)

    Hidden

    No

     

    Description

    Maximum processor performance state. The performance state is specified as a percentage of maximum processor frequency.

    GUID

    bc5038f7-23e0-4960-96da-33abaf5935ec

    PowerCfg Alias

    PROCTHROTTLEMAX

    Minimum Value

    0

    Maximum Value

    100

    Label

    Percentage (%)

    Hidden

    No

     

     

    Additional information on Vista power policy is described in detail in the following whitepaper:

    http://www.microsoft.com/whdc/system/pnppwr/powermgmt/PMpolicy_Vista.mspx

     

    Cheers,

    Stephen [Microsoft]

    • ReplyReply
    • QuoteQuote
     

All Replies

  • Tuesday, November 21, 2006 8:22 AMvirtualguy Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Vote As Helpful
    0

    I am facing the same issue any workarounds?

     SS7E1983 wrote:
    In previous version of windows, we call "ReadProcessorPwrScheme()" to retrieve the processor power policy settings, then modify the DynamicThrottle field (may be PO_THROTTLE_ADAPTIVE, PO_THROTTLE_CONSTANT, PO_THROTTLE_DEGRADE or PO_THROTTLE_NONE) of ProcessorPolicyAC or ProcessorPolicyDC in MACHINE_PROCESSOR_POWER_POLICY structure, and set the new processor power policy with "WriteProcessorPwrScheme()" to switch the processor performance.

    But in Windows Vista, these two APIs are no longer available. Though the documentation says they are supported in Windows Vista, you may find that they can just be called in previous version of windows if you see their declaration in the header file "PowrProf.h".

    I also tried "CallNtPowerInfomation()" to retrieve processor information, processor power policy AC or DC, but never succeed.

    I wonder how I can control the processor throttle in Windows Vista as previous version of windows.

    Thanks

    • ReplyReply
    • QuoteQuote
     
  • Tuesday, February 19, 2008 2:23 AMvichsu Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Vote As Helpful
    0
    same here. does anyone know how to set processor power policy in desktop? or, is the setting of processor power policy supported by desktop CPU?
    • ReplyReply
    • QuoteQuote
     
Need Help with Forums? (FAQ)
 
© 2009 Microsoft Corporation. All rights reserved.
Terms of Use
|
Trademarks
|
Privacy Statement