예제 #1
0
        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);
        }
예제 #2
0
        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));
        }
예제 #3
0
 private static extern bool GetCurrentPowerPolicies(ref GLOBAL_POWER_POLICY pGlobalPowerPolicy,
                                                    ref POWER_POLICY pPowerPolicy);