public static uint GetVideoTimeoutDC() { uint id; GetActivePwrScheme(out id); GLOBAL_POWER_POLICY gpp = new GLOBAL_POWER_POLICY(); POWER_POLICY pp = new POWER_POLICY(); bool result = GetCurrentPowerPolicies(ref gpp, ref pp); return(pp.user.VideoTimeoutDc); }
public static bool SetNewVideoTimeoutDC(uint sec) { uint id; GetActivePwrScheme(out id); GLOBAL_POWER_POLICY gpp = new GLOBAL_POWER_POLICY(); POWER_POLICY pp = new POWER_POLICY(); bool result = GetCurrentPowerPolicies(ref gpp, ref pp); pp.user.VideoTimeoutDc = sec; return(SetActivePwrScheme(id, IntPtr.Zero, ref pp)); }
private static extern bool GetCurrentPowerPolicies(ref GLOBAL_POWER_POLICY pGlobalPowerPolicy, ref POWER_POLICY pPowerPolicy);