You need to dllimport powrprof.dll, and use ReadProcessorPwrScheme API, then access the processorPolicyInfoAc.DemotePercent and ProcessorPolicyInfoAc.PromotePercent
See the code bellow. Not tested but it will show you the way (I use this code to get DynamicThrottle information and it works).
struct PROCESSOR_POWER_POLICY_INFO
{
public uint TimeCheck;
public uint DemoteLimit;
public uint PromoteLimit;
public byte DemotePercent;
public byte PromotePercent;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)]
public byte[] Spare;
public uint AllowBits;
}
struct PROCESSOR_POWER_POLICY
{
public uint Revision;
public byte DynamicThrottle;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)]
public byte[] Spare;
public uint Reserved;
public uint PolicyCount;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)]
public PROCESSOR_POWER_POLICY_INFO[] Policy;
}
struct MACHINE_PROCESSOR_POWER_POLICY
{
public uint Revision;
public PROCESSOR_POWER_POLICY ProcessorPolicyAc;
public PROCESSOR_POWER_POLICY ProcessorPolicyDc;
}
[DllImport("powrprof.dll", SetLastError = true)]
static extern bool ReadProcessorPwrScheme(uint uiID, out MACHINE_PROCESSOR_POWER_POLICY pMachineProcessorPowerPolicy);
public void ReadProcessorPowerScheme()
{
MACHINE_PROCESSOR_POWER_POLICY machinep = new MACHINE_PROCESSOR_POWER_POLICY();
uint scheme = 0;
if (ReadProcessorPwrScheme(scheme, out machinep))
{
}
}
Edgar Rocha Carvalho