Power Management Interfaces for Windows - CPU

What APIs are provided by Windows for managing the CPU power (I'm interested in scaling the processor frequency, setting the minimum and maximum processor frequencies - similar to what you can do in the control panel in power plans, but programmatically). I am also interested in API.Net. (This is not what I intend to use in a production environment, but rather as a proof of concept for some dynamic power management algorithms)

+7
api winapi power-management
source share
3 answers

C ++ Power Management API: http://msdn.microsoft.com/en-us/library/aa373170.aspx

The .NET Power Management APIs are located in the Microsoft.Win32 namespace.

Example from http://msdn.microsoft.com/en-us/library/hxkc1kwd.aspx :

 private void powerModeChanged(System.Object sender, Microsoft.Win32.PowerModeChangedEventArgs e) { int si = SystemInformation.PowerStatus; switch (si) { case BatteryChargeStatus.Low: MessageBox.Show("Battery is running low", MessageBoxIcon.Exclamation); case BatteryChargeStatus.Low: MessageBox.Show("Battery is critically low", MessageBoxIcon.Stop); Default: // Battery is okay. } } 

You can find a lot more in this namespace.

+5
source share

Have you tried digging into the power management API ?

+2
source share

Have you checked the WMI method? The Win32_Processor class provides a lot of information, such as LoadPercentage, PowerManagementCapabilities ...

http://msdn.microsoft.com/en-us/library/aa394373%28VS.85%29.aspx

WMI Link: http://msdn.microsoft.com/en-us/library/aa394572%28VS.85%29.aspx

+1
source share

All Articles