diff --git a/PInvoke/PowrProf/WinNT.cs b/PInvoke/PowrProf/WinNT.cs
index 2588b9ce..9ca09e8d 100644
--- a/PInvoke/PowrProf/WinNT.cs
+++ b/PInvoke/PowrProf/WinNT.cs
@@ -1,10 +1,24 @@
using System;
using System.Runtime.InteropServices;
+using Vanara.InteropServices;
namespace Vanara.PInvoke
{
public static partial class PowrProf
{
+ #region Well-known power schemes
+
+ ///
+ /// Maximum Power Savings - indicates that very aggressive power savings measures will be used to help stretch battery life.
+ ///
+ public readonly static Guid GUID_MAX_POWER_SAVINGS = new Guid("{A1841308-3541-4FAB-BC81-F71556F20B4A}");
+
+ /// No Power Savings - indicates that almost no power savings measures will be used.
+ public readonly static Guid GUID_MIN_POWER_SAVINGS = new Guid("{8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c}");
+
+ /// Typical Power Savings - indicates that fairly aggressive power savings measures will be used.
+ public static readonly Guid GUID_TYPICAL_POWER_SAVINGS = new Guid("{381B4222-F694-41F0-9685-FF5BB260DF2E}");
+
///
/// This is a special GUID that represents "every power scheme". That is, it indicates that any write to this power scheme should be
/// reflected to every scheme present. This allows users to write a single setting once and have it apply to all schemes. They can
@@ -12,68 +26,49 @@ namespace Vanara.PInvoke
///
public static readonly Guid ALL_POWERSCHEMES_GUID = new Guid("{68A1E95E-13EA-41E1-8011-0C496CA490B0}");
- ///
- /// Specifies the power source for the system. consumers may register for notification when the power source changes and will be
- /// notified with one of 3 values: 0 - Indicates the system is being powered by an AC power source. 1 - Indicates the system is being
- /// powered by a DC power source. 2 - Indicates the system is being powered by a short-term DC power source. For example, this would
- /// be the case if the system is being powered by a short-term battery supply in a backing UPS system. When this value is received,
- /// the consumer should make preparations for either a system hibernate or system shutdown.
- ///
- public static readonly Guid GUID_ACDC_POWER_SOURCE = new Guid("{5D3E9A59-E9D5-4B00-A6BD-FF34FF516548}");
-
///
/// Define a special GUID which will be used to define the active power scheme. User will register for this power setting GUID, and
/// when the active power scheme changes, they'll get a callback where the payload is the GUID representing the active power-scheme.
///
public static readonly Guid GUID_ACTIVE_POWERSCHEME = new Guid("{31F9F286-5084-42FE-B720-2B0264993763}");
- /// Specifies a change in the input controller(s) global system's state: e.g. enabled, suppressed, filtered.
- public static readonly Guid GUID_ADAPTIVE_INPUT_CONTROLLER_STATE = new Guid("{0E98FAE9-F45A-4DE1-A757-6031F197F6EA}");
+ #endregion
+
+ #region Adaptive power behavior settings
/// {8619B916-E004-4dd8-9B66-DAE86F806698}
public static readonly Guid GUID_ADAPTIVE_POWER_BEHAVIOR_SUBGROUP = new Guid("{8619b916-e004-4dd8-9b66-dae86f806698}");
- ///
- /// Specifies power settings which will decide whether to prefer visual quality or battery life for an Advanced Color capable display
- ///
- public static readonly Guid GUID_ADVANCED_COLOR_QUALITY_BIAS = new Guid("{684c3e69-a4f7-4014-8754-d45179a56167}");
+ /// Defines a guid to control Standby Reserve Time.
+ public static readonly Guid GUID_STANDBY_RESERVE_TIME = new Guid("{468FE7E5-1158-46EC-88bc-5b96c9e44fd0}");
- /// Specify whether away mode is allowed
- public static readonly Guid GUID_ALLOW_AWAYMODE = new Guid("{25dfa149-5dd1-4736-b5ab-e8a37b5b8187}");
+ /// Defines a guid to control Standby Reset Percentage.
+ public static readonly Guid GUID_STANDBY_RESET_PERCENT = new Guid("{49cb11a5-56e2-4afb-9d38-3df47872e21b}");
- /// Defines a guid for enabling/disabling the ability to create display required power requests.
- public static readonly Guid GUID_ALLOW_DISPLAY_REQUIRED = new Guid("{A9CEB8DA-CD46-44FB-A98B-02AF69DE4623}");
+ /// Specifies the input timeout (in seconds) to be used to indicate UserUnkown. Value 0 effectively disables this feature.
+ public static readonly Guid GUID_NON_ADAPTIVE_INPUT_TIMEOUT = new Guid("{5ADBBFBC-074E-4da1-BA38-DB8B36B2C8F3}");
- /// Defines a guid for enabling/disabling the ability to wake via RTC.
- public static readonly Guid GUID_ALLOW_RTC_WAKE = new Guid("{BD3B718A-0680-4D9D-8AB2-E1D2B4AC806D}");
+ /// Specifies a change in the input controller(s) global system's state: e.g. enabled, suppressed, filtered.
+ public static readonly Guid GUID_ADAPTIVE_INPUT_CONTROLLER_STATE = new Guid("{0E98FAE9-F45A-4DE1-A757-6031F197F6EA}");
- /// Defines a guid for enabling/disabling standby (S1-S3) states. This does not affect hibernation (S4).
- public static readonly Guid GUID_ALLOW_STANDBY_STATES = new Guid("{abfc2519-3608-4c2a-94ea-171b0ed546ab}");
+ /// Defines a guid to control Standby Budget Grace Period.
+ public static readonly Guid GUID_STANDBY_BUDGET_GRACE_PERIOD = new Guid("{60C07FE1-0556-45CF-9903-D56E32210242}");
- /// Defines a guid for enabling/disabling the ability to create system required power requests.
- public static readonly Guid GUID_ALLOW_SYSTEM_REQUIRED = new Guid("{A4B195F5-8225-47D8-8012-9D41369786E2}");
+ /// Defines a guid to control Standby Budget Percent.
+ public static readonly Guid GUID_STANDBY_BUDGET_PERCENT = new Guid("{9fe527be-1b70-48da-930d-7bcf17b44990}");
- ///
- /// Define a GUID that will represent the action of a direct experience button on the platform. Users will register for this DPPE
- /// setting and receive notification when the h/w button is pressed.
- ///
- public static readonly Guid GUID_APPLAUNCH_BUTTON = new Guid("{1A689231-7399-4E9A-8F99-B71F999DB3FA}");
+ /// Defines a guid to control Standby Reserve Grace Period.
+ public static readonly Guid GUID_STANDBY_RESERVE_GRACE_PERIOD = new Guid("{c763ee92-71e8-4127-84eb-f6ed043a3e3d}");
- ///
- /// Notification to listeners that the system is fairly busy and won't be moving into an idle state any time soon. This can be used
- /// as a hint to listeners that now might be a good time to do background tasks.
- ///
- public static readonly Guid GUID_BACKGROUND_TASK_NOTIFICATION = new Guid("{CF23F240-2A54-48D8-B114-DE1518FF052E}");
+ /// Defines a guid to control User Presence Prediction mode.
+ public static readonly Guid GUID_USER_PRESENCE_PREDICTION = new Guid("{82011705-FB95-4D46-8D35-4042B1D20DEF}");
- ///
- /// Specifies change in number of batteries present on the system. The consumer may register for notification in order to track
- /// change in number of batteries available on a system.
- ///
- /// Once registered, the consumer can expect to be notified whenever the batteries are added or removed from the system.
- ///
- /// The consumer will receive a value indicating number of batteries currently present on the system.
- ///
- public static readonly Guid GUID_BATTERY_COUNT = new Guid("{7d263f15-fca4-49e5-854b-a9f2bfbd5c24}");
+ #endregion
+
+ #region Battery Discharge Settings
+
+ /// Specifies the subgroup which will contain all of the battery discharge settings for a single policy.
+ public static readonly Guid GUID_BATTERY_SUBGROUP = new Guid("{E73A048D-BF27-4F12-9731-8B2076E8891F}");
///
public static readonly Guid GUID_BATTERY_DISCHARGE_ACTION_0 = new Guid("{637EA02F-BBCB-4015-8E2C-A1C7B9C0B546}");
@@ -111,30 +106,75 @@ namespace Vanara.PInvoke
///
public static readonly Guid GUID_BATTERY_DISCHARGE_LEVEL_3 = new Guid("{58AFD5A6-C2DD-47D2-9FBF-EF70CC5C5965}");
- ///
- /// Specifies the percentage of battery life remaining. The consumer may register for notification in order to track battery life in
- /// a fine-grained manner.
- ///
- /// Once registered, the consumer can expect to be notified as the battery life percentage changes.
- ///
- /// The consumer will receive a value between 0 and 100 (inclusive) which indicates percent battery life remaining.
- ///
- public static readonly Guid GUID_BATTERY_PERCENTAGE_REMAINING = new Guid("{A7AD8041-B45A-4CAE-87A3-EECBB468A9E1}");
+ #endregion
- /// Specifies the subgroup which will contain all of the battery discharge settings for a single policy.
- public static readonly Guid GUID_BATTERY_SUBGROUP = new Guid("{E73A048D-BF27-4F12-9731-8B2076E8891F}");
+ #region Harddisk settings
- /// Specifies standby connectivity preference.
- public static readonly Guid GUID_CONNECTIVITY_IN_STANDBY = new Guid("{F15576E8-98B7-4186-B944-EAFA664402D9}");
+ /// Specifies the subgroup which will contain all of the hard disk settings for a single policy.
+ public static readonly Guid GUID_DISK_SUBGROUP = new Guid("{0012EE47-9041-4B5D-9B77-535FBA8B1442}");
- /// Specifies a change in the current monitor's display state.
- public static readonly Guid GUID_CONSOLE_DISPLAY_STATE = new Guid("{6fe69556-704a-47a0-8f24-c28d936fda47}");
+ /// Specifies a maximum power consumption level.
+ public static readonly Guid GUID_DISK_MAX_POWER = new Guid("{51dea550-bb38-4bc4-991b-eacf37be5ec8}");
+
+ /// Specifies (in seconds) how long we wait after the last disk access before we power off the disk.
+ public static readonly Guid GUID_DISK_POWERDOWN_TIMEOUT = new Guid("{6738E2C4-E8A5-4A42-B16A-E040E769756E}");
///
- /// Define a GUID for controlling the criticality of sleep state transitions. Critical sleep transitions do not query applications,
- /// services or drivers before transitioning the platform to a sleep state.
+ /// Specifies (in milliseconds) how long we wait after the last disk access before we power off the disk taking into account if IO
+ /// coalescing is active.
///
- public static readonly Guid GUID_CRITICAL_POWER_TRANSITION = new Guid("{B7A27025-E569-46c2-A504-2B96CAD225A1}");
+ public static readonly Guid GUID_DISK_IDLE_TIMEOUT = new Guid("{58E39BA8-B8E6-4EF6-90D0-89AE32B258D6}");
+
+ /// Specifies the amount of contiguous disk activity time to ignore when calculating disk idleness.
+ public static readonly Guid GUID_DISK_BURST_IGNORE_THRESHOLD = new Guid("{80e3c60e-bb94-4ad8-bbe0-0d3195efc663}");
+
+ /// Specifies if the operating system should use adaptive timers (based on previous behavior) to power down the disk,
+ public static readonly Guid GUID_DISK_ADAPTIVE_POWERDOWN = new Guid("{396A32E1-499A-40B2-9124-A96AFE707667}");
+
+ ///
+ public static readonly Guid GUID_ENABLE_SWITCH_FORCED_SHUTDOWN = new Guid("{833a6b62-dfa4-46d1-82f8-e09e34d029d6}");
+
+ #endregion
+
+ #region Energy Saver settings
+
+ /// Specifies the subgroup which will contain all of the Energy Saver settings for a single policy.
+ public static readonly Guid GUID_ENERGY_SAVER_SUBGROUP = new Guid("{DE830923-A562-41AF-A086-E3A2C6BAD2DA}");
+
+ /// Indicates if Energy Saver is ON or OFF.
+ public static readonly Guid GUID_POWER_SAVING_STATUS = new Guid("{e00958c0-c213-4ace-ac77-fecced2eeea5}");
+
+ /// Defines a guid to engage Energy Saver at specific battery charge level
+ public static readonly Guid GUID_ENERGY_SAVER_BATTERY_THRESHOLD = new Guid("{E69653CA-CF7F-4F05-AA73-CB833FA90AD4}");
+
+ /// Defines a guid to specify display brightness weight when Energy Saver is engaged
+ public static readonly Guid GUID_ENERGY_SAVER_BRIGHTNESS = new Guid("{13D09884-F74E-474A-A852-B6BDE8AD03A8}");
+
+ /// Defines a guid to specify the Energy Saver policy
+ public static readonly Guid GUID_ENERGY_SAVER_POLICY = new Guid("{5C5BB349-AD29-4ee2-9D0B-2B25270F7A81}");
+
+ #endregion
+
+ #region Graphics configuration
+
+ /// Specified the subgroup which contains all in-box graphics settings.
+ public static readonly Guid GUID_GRAPHICS_SUBGROUP = new Guid("{5fb4938d-1ee8-4b0f-9a3c-5036b0ab995c}");
+
+ /// Specifies the GPU preference policy.
+ public static readonly Guid GUID_GPU_PREFERENCE_POLICY = new Guid("{dd848b2a-8a5d-4451-9ae2-39cd41658f6c}");
+
+ #endregion
+
+ #region Idle resiliency settings
+
+ /// Specifies the subgroup which will contain all of the idle resiliency settings for a single policy.
+ public static readonly Guid GUID_IDLE_RESILIENCY_SUBGROUP = new Guid("{2E601130-5351-4d9d-8E04-252966BAD054}");
+
+ ///
+ /// Specifies (in milliseconds) how long we wait after the last disk access before we power off the disk in case when IO coalescing
+ /// is active.
+ ///
+ public static readonly Guid GUID_DISK_COALESCING_POWERDOWN_TIMEOUT = new Guid("{C36F0EB4-2988-4a70-8EEE-0884FC2C2433}");
/// Specifies the deep sleep policy setting. This is intended to override the GUID_IDLE_RESILIENCY_PERIOD
public static readonly Guid GUID_DEEP_SLEEP_ENABLED = new Guid("{d502f7ee-1dc7-4efd-a55d-f04b6f5c0545}");
@@ -146,59 +186,12 @@ namespace Vanara.PInvoke
///
public static readonly Guid GUID_DEEP_SLEEP_PLATFORM_STATE = new Guid("{d23f2fb8-9536-4038-9c94-1ce02e5c2152}");
- /// Specifies whether to use the "performance" or "conservative" timeouts for device idle management.
- public static readonly Guid GUID_DEVICE_IDLE_POLICY = new Guid("{4faab71a-92e5-4726-b531-224559672d19}");
-
- /// Monitor brightness policy when in normal state.
- public static readonly Guid GUID_DEVICE_POWER_POLICY_VIDEO_BRIGHTNESS = new Guid("{aded5e82-b909-4619-9949-f5d71dac0bcb}");
-
- /// Monitor brightness policy when in dim state.
- public static readonly Guid GUID_DEVICE_POWER_POLICY_VIDEO_DIM_BRIGHTNESS = new Guid("{f1fbfde2-a960-4165-9f88-50667911ce96}");
-
- /// Specifies the mode for disconnected standby.
- public static readonly Guid GUID_DISCONNECTED_STANDBY_MODE = new Guid("{68AFB2D9-EE95-47A8-8F50-4115088073B1}");
-
- /// Specifies if the operating system should use adaptive timers (based on previous behavior) to power down the disk,
- public static readonly Guid GUID_DISK_ADAPTIVE_POWERDOWN = new Guid("{396A32E1-499A-40B2-9124-A96AFE707667}");
-
- /// Specifies the amount of contiguous disk activity time to ignore when calculating disk idleness.
- public static readonly Guid GUID_DISK_BURST_IGNORE_THRESHOLD = new Guid("{80e3c60e-bb94-4ad8-bbe0-0d3195efc663}");
-
///
- /// Specifies (in milliseconds) how long we wait after the last disk access before we power off the disk in case when IO coalescing
- /// is active.
+ /// Specifies the maximum clock interrupt period (in ms)
+ ///
+ /// N.B. This power setting is DEPRECATED.
///
- public static readonly Guid GUID_DISK_COALESCING_POWERDOWN_TIMEOUT = new Guid("{C36F0EB4-2988-4a70-8EEE-0884FC2C2433}");
-
- ///
- /// Specifies (in milliseconds) how long we wait after the last disk access before we power off the disk taking into account if IO
- /// coalescing is active.
- ///
- public static readonly Guid GUID_DISK_IDLE_TIMEOUT = new Guid("{58E39BA8-B8E6-4EF6-90D0-89AE32B258D6}");
-
- /// Specifies a maximum power consumption level.
- public static readonly Guid GUID_DISK_MAX_POWER = new Guid("{51dea550-bb38-4bc4-991b-eacf37be5ec8}");
-
- /// Specifies (in seconds) how long we wait after the last disk access before we power off the disk.
- public static readonly Guid GUID_DISK_POWERDOWN_TIMEOUT = new Guid("{6738E2C4-E8A5-4A42-B16A-E040E769756E}");
-
- /// Specifies the subgroup which will contain all of the hard disk settings for a single policy.
- public static readonly Guid GUID_DISK_SUBGROUP = new Guid("{0012EE47-9041-4B5D-9B77-535FBA8B1442}");
-
- ///
- public static readonly Guid GUID_ENABLE_SWITCH_FORCED_SHUTDOWN = new Guid("{833a6b62-dfa4-46d1-82f8-e09e34d029d6}");
-
- /// Defines a guid to engage Energy Saver at specific battery charge level
- public static readonly Guid GUID_ENERGY_SAVER_BATTERY_THRESHOLD = new Guid("{E69653CA-CF7F-4F05-AA73-CB833FA90AD4}");
-
- /// Defines a guid to specify display brightness weight when Energy Saver is engaged
- public static readonly Guid GUID_ENERGY_SAVER_BRIGHTNESS = new Guid("{13D09884-F74E-474A-A852-B6BDE8AD03A8}");
-
- /// Defines a guid to specify the Energy Saver policy
- public static readonly Guid GUID_ENERGY_SAVER_POLICY = new Guid("{5C5BB349-AD29-4ee2-9D0B-2B25270F7A81}");
-
- /// Specifies the subgroup which will contain all of the Energy Saver settings for a single policy.
- public static readonly Guid GUID_ENERGY_SAVER_SUBGROUP = new Guid("{DE830923-A562-41AF-A086-E3A2C6BAD2DA}");
+ public static readonly Guid GUID_IDLE_RESILIENCY_PERIOD = new Guid("{C42B79AA-AA3A-484b-A98F-2CF32AA90A28}");
///
/// Specifies (in seconds) how long we wait after the CS Enter before we deactivate execution required request.
@@ -208,38 +201,12 @@ namespace Vanara.PInvoke
///
public static readonly Guid GUID_EXECUTION_REQUIRED_REQUEST_TIMEOUT = new Guid("{3166BC41-7E98-4e03-B34E-EC0F5F2B218E}");
- ///
- /// Global notification indicating to listeners user activity/presence across all sessions in the system (Present, NotPresent, Inactive)
- ///
- public static readonly Guid GUID_GLOBAL_USER_PRESENCE = new Guid("{786E8A1D-B427-4344-9207-09E70BDCBEA9}");
+ #endregion
- /// Specifies the GPU preference policy.
- public static readonly Guid GUID_GPU_PREFERENCE_POLICY = new Guid("{dd848b2a-8a5d-4451-9ae2-39cd41658f6c}");
+ #region Interrupt steering settings
- /// Specified the subgroup which contains all in-box graphics settings.
- public static readonly Guid GUID_GRAPHICS_SUBGROUP = new Guid("{5fb4938d-1ee8-4b0f-9a3c-5036b0ab995c}");
-
- /// Specifies whether or not Fast S4 should be enabled if the system supports it 94AC6D29-73CE-41A6-809F-6363BA21B47E
- public static readonly Guid GUID_HIBERNATE_FASTS4_POLICY = new Guid("{94AC6D29-73CE-41A6-809F-6363BA21B47E}");
-
- /// Specifies (in seconds) how long we wait after the system is deemed "idle" before moving to hibernate (S4).
- public static readonly Guid GUID_HIBERNATE_TIMEOUT = new Guid("{9D7815A6-7EE4-497E-8888-515A05F02364}");
-
- ///
- /// Notification to listeners that the system is fairly busy and won't be moving into an idle state any time soon. This can be used
- /// as a hint to listeners that now might be a good time to do background tasks.
- ///
- public static readonly Guid GUID_IDLE_BACKGROUND_TASK = new Guid("{515C31D8-F734-163D-A0FD-11A08C91E8F1}");
-
- ///
- /// Specifies the maximum clock interrupt period (in ms)
- ///
- /// N.B. This power setting is DEPRECATED.
- ///
- public static readonly Guid GUID_IDLE_RESILIENCY_PERIOD = new Guid("{C42B79AA-AA3A-484b-A98F-2CF32AA90A28}");
-
- /// Specifies the subgroup which will contain all of the idle resiliency settings for a single policy.
- public static readonly Guid GUID_IDLE_RESILIENCY_SUBGROUP = new Guid("{2E601130-5351-4d9d-8E04-252966BAD054}");
+ /// Specifies if forced shutdown should be used for all button and lid initiated shutdown actions.
+ public static readonly Guid GUID_INTSTEER_SUBGROUP = new Guid("{48672f38-7a9a-4bb2-8bf8-3d85be19de4e}");
///
public static readonly Guid GUID_INTSTEER_LOAD_PER_PROC_TRIGGER = new Guid("{73cde64d-d720-4bb2-a860-c755afe77ef2}");
@@ -247,63 +214,19 @@ namespace Vanara.PInvoke
///
public static readonly Guid GUID_INTSTEER_MODE = new Guid("{2bfc24f9-5ea2-4801-8213-3dbae01aa39d}");
- /// Specifies if forced shutdown should be used for all button and lid initiated shutdown actions.
- public static readonly Guid GUID_INTSTEER_SUBGROUP = new Guid("{48672f38-7a9a-4bb2-8bf8-3d85be19de4e}");
-
///
public static readonly Guid GUID_INTSTEER_TIME_UNPARK_TRIGGER = new Guid("{d6ba4903-386f-4c2c-8adb-5c21b3328d25}");
- /// Defines a guid for enabling/disabling legacy RTC mitigations.
- public static readonly Guid GUID_LEGACY_RTC_MITIGATION = new Guid("{1A34BDC3-7E6B-442E-A9D0-64B6EF378E84}");
+ #endregion
- /// Specifies (in a POWER_ACTION_POLICY structure) the appropriate action to take when the system lid is closed.
- public static readonly Guid GUID_LIDCLOSE_ACTION = new Guid("{5CA83367-6E45-459F-A27B-476B1D01C936}");
-
- ///
- public static readonly Guid GUID_LIDOPEN_POWERSTATE = new Guid("{99FF10E7-23B1-4C07-A9D1-5C3206D741B4}");
+ #region No Subgroup
///
- /// Specifies the current state of the lid (open or closed). The callback won't be called at all until a lid device is found and its
- /// current state is known.
- ///
- /// Values:
+ /// This is a special GUID that represents "no subgroup" of settings. That is, it indicates that settings that are in the root of the
+ /// power policy hierarchy as opposed to settings that are buried under a subgroup of settings. This should be used when querying for
+ /// power settings that may not fall into a subgroup.
///
- public static readonly Guid GUID_LIDSWITCH_STATE_CHANGE = new Guid("{BA3E0F4D-B817-4094-A2D1-D56379E6A0F3}");
-
- ///
- /// Specifies the behavior of the system when we wake from standby or hibernate. If this is set, then we will cause the console to
- /// lock after we resume.
- ///
- public static readonly Guid GUID_LOCK_CONSOLE_ON_WAKE = new Guid("{0E796BDB-100D-47D6-A2D5-F7D2DAA51F51}");
-
- ///
- /// Maximum Power Savings - indicates that very aggressive power savings measures will be used to help stretch battery life.
- ///
- public readonly static Guid GUID_MAX_POWER_SAVINGS = new Guid("{A1841308-3541-4FAB-BC81-F71556F20B4A}");
-
- /// No Power Savings - indicates that almost no power savings measures will be used.
- public readonly static Guid GUID_MIN_POWER_SAVINGS = new Guid("{8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c}");
-
- /// Specifies whether mixed reality mode is engaged.
- public static readonly Guid GUID_MIXED_REALITY_MODE = new Guid("{1E626B4E-CF04-4f8d-9CC7-C97C5B0F2391}");
-
- /// Specifies if the monitor is currently being powered or not.
- public static readonly Guid GUID_MONITOR_POWER_ON = new Guid("{02731015-4510-4526-99E6-E5A17EBD1AEA}");
-
- /// Specifies the input timeout (in seconds) to be used to indicate UserUnkown. Value 0 effectively disables this feature.
- public static readonly Guid GUID_NON_ADAPTIVE_INPUT_TIMEOUT = new Guid("{5ADBBFBC-074E-4da1-BA38-DB8B36B2C8F3}");
-
- /// Specifies the PCI Express ASPM power policy.
- public static readonly Guid GUID_PCIEXPRESS_ASPM_POLICY = new Guid("{ee12f906-d277-404b-b6da-e5fa1a576df5}");
-
- /// Specifies the subgroup which will contain all of the PCI Express settings for a single policy.
- public static readonly Guid GUID_PCIEXPRESS_SETTINGS_SUBGROUP = new Guid("{501a4d13-42af-4429-9fd1-a8218c268e20}");
-
- /// Indicates if Energy Saver is ON or OFF.
- public static readonly Guid GUID_POWER_SAVING_STATUS = new Guid("{e00958c0-c213-4ace-ac77-fecced2eeea5}");
-
- /// Specifies (in a POWER_ACTION_POLICY structure) the appropriate action to take when the system power button is pressed.
- public static readonly Guid GUID_POWERBUTTON_ACTION = new Guid("{7648EFA3-DD9C-4E3E-B566-50F929386280}");
+ public static readonly Guid NO_SUBGROUP_GUID = new Guid("{FEA3413E-7E05-4911-9A71-700331F1C294}");
///
/// This is a special GUID that represents a 'personality' that each power scheme will have. In other words, each power scheme will
@@ -330,9 +253,79 @@ namespace Vanara.PInvoke
///
public static readonly Guid GUID_POWERSCHEME_PERSONALITY = new Guid("{245D8541-3943-4422-B025-13A784F679B7}");
+ ///
+ /// Specifies the behavior of the system when we wake from standby or hibernate. If this is set, then we will cause the console to
+ /// lock after we resume.
+ ///
+ public static readonly Guid GUID_LOCK_CONSOLE_ON_WAKE = new Guid("{0E796BDB-100D-47D6-A2D5-F7D2DAA51F51}");
+
+ /// Specifies standby connectivity preference.
+ public static readonly Guid GUID_CONNECTIVITY_IN_STANDBY = new Guid("{F15576E8-98B7-4186-B944-EAFA664402D9}");
+
+ /// Specifies the mode for disconnected standby.
+ public static readonly Guid GUID_DISCONNECTED_STANDBY_MODE = new Guid("{68AFB2D9-EE95-47A8-8F50-4115088073B1}");
+
+ /// Specifies whether to use the "performance" or "conservative" timeouts for device idle management.
+ public static readonly Guid GUID_DEVICE_IDLE_POLICY = new Guid("{4faab71a-92e5-4726-b531-224559672d19}");
+
+ #endregion
+
+ #region PCI Express Power Management
+
+ /// Specifies the subgroup which will contain all of the PCI Express settings for a single policy.
+ public static readonly Guid GUID_PCIEXPRESS_SETTINGS_SUBGROUP = new Guid("{501a4d13-42af-4429-9fd1-a8218c268e20}");
+
+ /// Specifies the PCI Express ASPM power policy.
+ public static readonly Guid GUID_PCIEXPRESS_ASPM_POLICY = new Guid("{ee12f906-d277-404b-b6da-e5fa1a576df5}");
+
+ #endregion
+
+ #region Processor power settings
+
+ /// Specifies the subgroup which will contain all of the processor settings for a single policy.
+ public static readonly Guid GUID_PROCESSOR_SETTINGS_SUBGROUP = new Guid("{54533251-82BE-4824-96C1-47B60B740D00}");
+
+ ///
+ /// Specifies a percentage (between 0 and 100) that the processor frequency should never go above. For example, if this value is set
+ /// to 80, then the processor frequency will never be throttled above 80 percent of its maximum frequency by the system.
+ ///
+ public static readonly Guid GUID_PROCESSOR_THROTTLE_MAXIMUM = new Guid("{BC5038F7-23E0-4960-96DA-33ABAF5935EC}");
+
+ ///
+ /// Specifies a percentage (between 0 and 100) that the processor frequency should never go above for Processor Power Efficiency
+ /// Class 1. For example, if this value is set to 80, then the processor frequency will never be throttled above 80 percent of its
+ /// maximum frequency by the system.
+ ///
+ public static readonly Guid GUID_PROCESSOR_THROTTLE_MAXIMUM_1 = new Guid("{BC5038F7-23E0-4960-96DA-33ABAF5935ED}");
+
+ ///
+ /// Specifies a percentage (between 0 and 100) that the processor frequency should not drop below. For example, if this value is set
+ /// to 50, then the processor frequency will never be throttled below 50 percent of its maximum frequency by the system.
+ ///
+ public static readonly Guid GUID_PROCESSOR_THROTTLE_MINIMUM = new Guid("{893DEE8E-2BEF-41E0-89C6-B55D0929964C}");
+
+ ///
+ /// Specifies a percentage (between 0 and 100) that the processor frequency should not drop below for Processor Power Efficiency
+ /// Class 1. For example, if this value is set to 50, then the processor frequency will never be throttled below 50 percent of its
+ /// maximum frequency by the system.
+ ///
+ public static readonly Guid GUID_PROCESSOR_THROTTLE_MINIMUM_1 = new Guid("{893DEE8E-2BEF-41E0-89C6-B55D0929964D}");
+
+ /// Specifies the maximum processor frequency (expressed in MHz).
+ public static readonly Guid GUID_PROCESSOR_FREQUENCY_LIMIT = new Guid("{75b0ae3f-bce0-45a7-8c89-c9611c25e100}");
+
+ /// {75B0AE3F-BCE0-45a7-8C89-C9611C25E101}
+ public static readonly Guid GUID_PROCESSOR_FREQUENCY_LIMIT_1 = new Guid("{75b0ae3f-bce0-45a7-8c89-c9611c25e101}");
+
/// Specifies whether throttle states are allowed to be used even when performance states are available.
public static readonly Guid GUID_PROCESSOR_ALLOW_THROTTLING = new Guid("{3b04d4fd-1cc7-4f23-ab1c-d1337819c4bb}");
+ /// Specifies processor power settings for CState policy data {68F262A7-F621-4069-B9A5-4874169BE23C}
+ public static readonly Guid GUID_PROCESSOR_IDLESTATE_POLICY = new Guid("{68f262a7-f621-4069-b9a5-4874169be23c}");
+
+ /// Specifies processor power settings for PerfState policy data {BBDC3814-18E9-4463-8A55-D197327C45C0}
+ public static readonly Guid GUID_PROCESSOR_PERFSTATE_POLICY = new Guid("{BBDC3814-18E9-4463-8A55-D197327C45C0}");
+
///
/// Specifies the performance target floor of a Processor Power Efficiency Class 0 processor when the system unparks Processor Power
/// Efficiency Class 1 processor(s).
@@ -420,12 +413,6 @@ namespace Vanara.PInvoke
/// Specifies whether the processor should perform duty cycling.
public static readonly Guid GUID_PROCESSOR_DUTY_CYCLING = new Guid("{4e4450b3-6179-4e91-b8f1-5bb9938f81a1}");
- /// Specifies the maximum processor frequency (expressed in MHz).
- public static readonly Guid GUID_PROCESSOR_FREQUENCY_LIMIT = new Guid("{75b0ae3f-bce0-45a7-8c89-c9611c25e100}");
-
- /// {75B0AE3F-BCE0-45a7-8C89-C9611C25E101}
- public static readonly Guid GUID_PROCESSOR_FREQUENCY_LIMIT_1 = new Guid("{75b0ae3f-bce0-45a7-8c89-c9611c25e101}");
-
///
/// Specifies the performance level (in units of Processor Power Efficiency Class 0 processor performance) at which the number of
/// Processor Power Efficiency Class 1 processors is decreased.
@@ -475,9 +462,6 @@ namespace Vanara.PInvoke
///
public static readonly Guid GUID_PROCESSOR_IDLE_TIME_CHECK = new Guid("{C4581C31-89AB-4597-8E2B-9C9CAB440E6B}");
- /// Specifies processor power settings for CState policy data {68F262A7-F621-4069-B9A5-4874169BE23C}
- public static readonly Guid GUID_PROCESSOR_IDLESTATE_POLICY = new Guid("{68f262a7-f621-4069-b9a5-4874169be23c}");
-
/// Specifies the minimum unparked processors when a latency hint is active (in a percentage).
public static readonly Guid GUID_PROCESSOR_LATENCY_HINT_MIN_UNPARK = new Guid("{616cdaa5-695e-4545-97ad-97dc2d1bdd88}");
@@ -644,9 +628,6 @@ namespace Vanara.PInvoke
///
public static readonly Guid GUID_PROCESSOR_PERF_TIME_CHECK = new Guid("{4d2b0152-7d5c-498b-88e2-34345392a2c5}");
- /// Specifies processor power settings for PerfState policy data {BBDC3814-18E9-4463-8A55-D197327C45C0}
- public static readonly Guid GUID_PROCESSOR_PERFSTATE_POLICY = new Guid("{BBDC3814-18E9-4463-8A55-D197327C45C0}");
-
///
/// Processor responsiveness settings
///
@@ -699,44 +680,228 @@ namespace Vanara.PInvoke
///
public static readonly Guid GUID_PROCESSOR_RESPONSIVENESS_PERF_FLOOR_1 = new Guid("{ce8e92ee-6a86-4572-bfe0-20c21d03cd41}");
- /// Specifies the subgroup which will contain all of the processor settings for a single policy.
- public static readonly Guid GUID_PROCESSOR_SETTINGS_SUBGROUP = new Guid("{54533251-82BE-4824-96C1-47B60B740D00}");
-
/// Specifies the scheduling policy for short running threads in a given QoS class.
public static readonly Guid GUID_PROCESSOR_SHORT_THREAD_SCHEDULING_POLICY = new Guid("{bae08b81-2d5e-4688-ad6a-13243356654b}");
/// Specifies the scheduling policy for threads in a given QoS class.
public static readonly Guid GUID_PROCESSOR_THREAD_SCHEDULING_POLICY = new Guid("{93B8B6DC-0698-4d1c-9EE4-0644E900C85D}");
- ///
- /// Specifies a percentage (between 0 and 100) that the processor frequency should never go above. For example, if this value is set
- /// to 80, then the processor frequency will never be throttled above 80 percent of its maximum frequency by the system.
- ///
- public static readonly Guid GUID_PROCESSOR_THROTTLE_MAXIMUM = new Guid("{BC5038F7-23E0-4960-96DA-33ABAF5935EC}");
-
- ///
- /// Specifies a percentage (between 0 and 100) that the processor frequency should never go above for Processor Power Efficiency
- /// Class 1. For example, if this value is set to 80, then the processor frequency will never be throttled above 80 percent of its
- /// maximum frequency by the system.
- ///
- public static readonly Guid GUID_PROCESSOR_THROTTLE_MAXIMUM_1 = new Guid("{BC5038F7-23E0-4960-96DA-33ABAF5935ED}");
-
- ///
- /// Specifies a percentage (between 0 and 100) that the processor frequency should not drop below. For example, if this value is set
- /// to 50, then the processor frequency will never be throttled below 50 percent of its maximum frequency by the system.
- ///
- public static readonly Guid GUID_PROCESSOR_THROTTLE_MINIMUM = new Guid("{893DEE8E-2BEF-41E0-89C6-B55D0929964C}");
-
- ///
- /// Specifies a percentage (between 0 and 100) that the processor frequency should not drop below for Processor Power Efficiency
- /// Class 1. For example, if this value is set to 50, then the processor frequency will never be throttled below 50 percent of its
- /// maximum frequency by the system.
- ///
- public static readonly Guid GUID_PROCESSOR_THROTTLE_MINIMUM_1 = new Guid("{893DEE8E-2BEF-41E0-89C6-B55D0929964D}");
-
/// Specifies various attributes that control processor performance/throttle states.
public static readonly Guid GUID_PROCESSOR_THROTTLE_POLICY = new Guid("{57027304-4AF6-4104-9260-E3D95248FC36}");
+ ///
+ /// Specifies active vs passive cooling. Although not directly related to processor settings, it is the processor that gets throttled
+ /// if we're doing passive cooling, so it is fairly strongly related. {94D3A615-A899-4AC5-AE2B-E4D8F634367F}
+ ///
+ public static readonly Guid GUID_SYSTEM_COOLING_POLICY = new Guid("{94D3A615-A899-4AC5-AE2B-E4D8F634367F}");
+
+ #endregion
+
+ #region System sleep settings
+
+ ///
+ /// Specifies the subgroup which will contain all of the sleep settings for a single policy. { 238C9FA8-0AAD-41ED-83F4-97BE242C8F20 }
+ ///
+ public static readonly Guid GUID_SLEEP_SUBGROUP = new Guid("{238C9FA8-0AAD-41ED-83F4-97BE242C8F20}");
+
+ ///
+ /// Specifies an idle threshold percentage (0-100). The system must be this idle over a period of time in order to idle to sleep.
+ ///
+ /// N.B. DEPRECATED IN WINDOWS 6.1
+ ///
+ public static readonly Guid GUID_SLEEP_IDLE_THRESHOLD = new Guid("{81cd32e0-7833-44f3-8737-7081f38d1f70}");
+
+ /// Specifies (in seconds) how long we wait after the system is deemed "idle" before moving to standby (S1, S2 or S3).
+ public static readonly Guid GUID_STANDBY_TIMEOUT = new Guid("{29F6C1DB-86DA-48C5-9FDB-F2B67B1F44DA}");
+
+ ///
+ /// Specifies (in seconds) how long the system should go back to sleep after waking unattended. 0 indicates that the standard
+ /// standby/hibernate idle policy should be used instead.
+ ///
+ public static readonly Guid GUID_UNATTEND_SLEEP_TIMEOUT = new Guid("{7bc4a2f9-d8fc-4469-b07b-33eb785aaca0}");
+
+ /// Specifies (in seconds) how long we wait after the system is deemed "idle" before moving to hibernate (S4).
+ public static readonly Guid GUID_HIBERNATE_TIMEOUT = new Guid("{9D7815A6-7EE4-497E-8888-515A05F02364}");
+
+ /// Specifies whether or not Fast S4 should be enabled if the system supports it 94AC6D29-73CE-41A6-809F-6363BA21B47E
+ public static readonly Guid GUID_HIBERNATE_FASTS4_POLICY = new Guid("{94AC6D29-73CE-41A6-809F-6363BA21B47E}");
+
+ ///
+ /// Define a GUID for controlling the criticality of sleep state transitions. Critical sleep transitions do not query applications,
+ /// services or drivers before transitioning the platform to a sleep state.
+ ///
+ public static readonly Guid GUID_CRITICAL_POWER_TRANSITION = new Guid("{B7A27025-E569-46c2-A504-2B96CAD225A1}");
+
+ /// Specifies if the system is entering or exiting 'away mode'. 98A7F580-01F7-48AA-9C0F-44352C29E5C0
+ public static readonly Guid GUID_SYSTEM_AWAYMODE = new Guid("{98A7F580-01F7-48AA-9C0F-44352C29E5C0}");
+
+ /// Defines a guid for enabling/disabling standby (S1-S3) states. This does not affect hibernation (S4).
+ public static readonly Guid GUID_ALLOW_STANDBY_STATES = new Guid("{abfc2519-3608-4c2a-94ea-171b0ed546ab}");
+
+ /// Defines a guid for enabling/disabling the ability to wake via RTC.
+ public static readonly Guid GUID_ALLOW_RTC_WAKE = new Guid("{BD3B718A-0680-4D9D-8AB2-E1D2B4AC806D}");
+
+ /// Defines a guid for enabling/disabling legacy RTC mitigations.
+ public static readonly Guid GUID_LEGACY_RTC_MITIGATION = new Guid("{1A34BDC3-7E6B-442E-A9D0-64B6EF378E84}");
+
+ /// Defines a guid for enabling/disabling the ability to create system required power requests.
+ public static readonly Guid GUID_ALLOW_SYSTEM_REQUIRED = new Guid("{A4B195F5-8225-47D8-8012-9D41369786E2}");
+
+ /// Specify whether away mode is allowed
+ [CorrespondingType(typeof(bool))]
+ public static readonly Guid GUID_ALLOW_AWAYMODE = new Guid("{25dfa149-5dd1-4736-b5ab-e8a37b5b8187}");
+
+ #endregion
+
+ #region System button actions
+
+ /// Specifies the subgroup which will contain all of the system button settings for a single policy.
+ public static readonly Guid GUID_SYSTEM_BUTTON_SUBGROUP = new Guid("{4F971E89-EEBD-4455-A8DE-9E59040E7347}");
+
+ /// Specifies (in a POWER_ACTION_POLICY structure) the appropriate action to take when the system power button is pressed.
+ public static readonly Guid GUID_POWERBUTTON_ACTION = new Guid("{7648EFA3-DD9C-4E3E-B566-50F929386280}");
+
+ /// Specifies (in a POWER_ACTION_POLICY structure) the appropriate action to take when the system sleep button is pressed.
+ public static readonly Guid GUID_SLEEPBUTTON_ACTION = new Guid("{96996BC0-AD50-47EC-923B-6F41874DD9EB}");
+
+ ///
+ /// Specifies (in a POWER_ACTION_POLICY structure) the appropriate action to take when the system sleep button is pressed.
+ ///
+ public static readonly Guid GUID_USERINTERFACEBUTTON_ACTION = new Guid("{A7066653-8D6C-40A8-910E-A1F54B84C7E5}");
+
+ /// Specifies (in a POWER_ACTION_POLICY structure) the appropriate action to take when the system lid is closed.
+ public static readonly Guid GUID_LIDCLOSE_ACTION = new Guid("{5CA83367-6E45-459F-A27B-476B1D01C936}");
+
+ ///
+ public static readonly Guid GUID_LIDOPEN_POWERSTATE = new Guid("{99FF10E7-23B1-4C07-A9D1-5C3206D741B4}");
+
+ #endregion
+
+ #region Video settings
+
+ /// Specifies the subgroup which will contain all of the video settings for a single policy.
+ public static readonly Guid GUID_VIDEO_SUBGROUP = new Guid("{7516B95F-F776-4464-8C53-06167F40CC99}");
+
+ /// Specifies if the operating system should use ambient light sensor to change adaptively the display's brightness.
+ /// Specifies (in seconds) how long we wait after the last user input has been received before we power off the video.
+ public static readonly Guid GUID_VIDEO_POWERDOWN_TIMEOUT = new Guid("{3C0BC021-C8A8-4E07-A973-6B14CBCB2B7E}");
+
+ ///
+ /// Specifies whether adaptive display dimming is turned on or off.
+ ///
+ /// N.B. This setting is DEPRECATED in Windows 8.1
+ ///
+ public static readonly Guid GUID_VIDEO_ANNOYANCE_TIMEOUT = new Guid("{82DBCF2D-CD67-40C5-BFDC-9F1A5CCD4663}");
+
+ ///
+ /// Specifies how much adaptive dim time out will be increased by.
+ ///
+ /// N.B. This setting is DEPRECATED in Windows 8.1
+ ///
+ public static readonly Guid GUID_VIDEO_ADAPTIVE_PERCENT_INCREASE = new Guid("{EED904DF-B142-4183-B10B-5A1197A37864}");
+
+ /// Specifies (in seconds) how long we wait after the last user input has been received before we dim the video.
+ public static readonly Guid GUID_VIDEO_DIM_TIMEOUT = new Guid("{17aaa29b-8b43-4b94-aafe-35f64daaf1ee}");
+
+ /// Specifies if the operating system should use adaptive timers (based on previous behavior) to power down the video.
+ public static readonly Guid GUID_VIDEO_ADAPTIVE_POWERDOWN = new Guid("{90959D22-D6A1-49B9-AF93-BCE885AD335B}");
+
+ /// Specifies if the monitor is currently being powered or not.
+ public static readonly Guid GUID_MONITOR_POWER_ON = new Guid("{02731015-4510-4526-99E6-E5A17EBD1AEA}");
+
+ /// Monitor brightness policy when in normal state.
+ public static readonly Guid GUID_DEVICE_POWER_POLICY_VIDEO_BRIGHTNESS = new Guid("{aded5e82-b909-4619-9949-f5d71dac0bcb}");
+
+ /// Monitor brightness policy when in dim state.
+ public static readonly Guid GUID_DEVICE_POWER_POLICY_VIDEO_DIM_BRIGHTNESS = new Guid("{f1fbfde2-a960-4165-9f88-50667911ce96}");
+
+ /// Current monitor brightness.
+ public static readonly Guid GUID_VIDEO_CURRENT_MONITOR_BRIGHTNESS = new Guid("{8ffee2c6-2d01-46be-adb9-398addc5b4ff}");
+
+ /// Specifies if the operating system should use ambient light sensor to change adaptively the display's brightness.
+ public static readonly Guid GUID_VIDEO_ADAPTIVE_DISPLAY_BRIGHTNESS = new Guid("{FBD9AA66-9553-4097-BA44-ED6E9D65EAB8}");
+
+ /// Specifies a change in the current monitor's display state.
+ public static readonly Guid GUID_CONSOLE_DISPLAY_STATE = new Guid("{6fe69556-704a-47a0-8f24-c28d936fda47}");
+
+ /// Defines a guid for enabling/disabling the ability to create display required power requests.
+ public static readonly Guid GUID_ALLOW_DISPLAY_REQUIRED = new Guid("{A9CEB8DA-CD46-44FB-A98B-02AF69DE4623}");
+
+ ///
+ /// Specifies the video power down timeout (in seconds) after the interactive console is locked (and sensors indicate
+ /// UserNotPresent). Value 0 effectively disables this feature.
+ ///
+ public static readonly Guid GUID_VIDEO_CONSOLE_LOCK_TIMEOUT = new Guid("{8ec4b3a5-6868-48c2-be75-4f3044be88a7}");
+
+ ///
+ /// Specifies power settings which will decide whether to prefer visual quality or battery life for an Advanced Color capable display
+ ///
+ public static readonly Guid GUID_ADVANCED_COLOR_QUALITY_BIAS = new Guid("{684c3e69-a4f7-4014-8754-d45179a56167}");
+
+ #endregion
+
+ #region Notifications
+
+ ///
+ /// Specifies the power source for the system. consumers may register for notification when the power source changes and will be
+ /// notified with one of 3 values: 0 - Indicates the system is being powered by an AC power source. 1 - Indicates the system is being
+ /// powered by a DC power source. 2 - Indicates the system is being powered by a short-term DC power source. For example, this would
+ /// be the case if the system is being powered by a short-term battery supply in a backing UPS system. When this value is received,
+ /// the consumer should make preparations for either a system hibernate or system shutdown.
+ ///
+ public static readonly Guid GUID_ACDC_POWER_SOURCE = new Guid("{5D3E9A59-E9D5-4B00-A6BD-FF34FF516548}");
+
+ ///
+ /// Define a GUID that will represent the action of a direct experience button on the platform. Users will register for this DPPE
+ /// setting and receive notification when the h/w button is pressed.
+ ///
+ public static readonly Guid GUID_APPLAUNCH_BUTTON = new Guid("{1A689231-7399-4E9A-8F99-B71F999DB3FA}");
+
+ ///
+ /// Notification to listeners that the system is fairly busy and won't be moving into an idle state any time soon. This can be used
+ /// as a hint to listeners that now might be a good time to do background tasks.
+ ///
+ public static readonly Guid GUID_BACKGROUND_TASK_NOTIFICATION = new Guid("{CF23F240-2A54-48D8-B114-DE1518FF052E}");
+
+ ///
+ /// Specifies change in number of batteries present on the system. The consumer may register for notification in order to track
+ /// change in number of batteries available on a system.
+ ///
+ /// Once registered, the consumer can expect to be notified whenever the batteries are added or removed from the system.
+ ///
+ /// The consumer will receive a value indicating number of batteries currently present on the system.
+ ///
+ public static readonly Guid GUID_BATTERY_COUNT = new Guid("{7d263f15-fca4-49e5-854b-a9f2bfbd5c24}");
+
+ ///
+ /// Specifies the percentage of battery life remaining. The consumer may register for notification in order to track battery life in
+ /// a fine-grained manner.
+ ///
+ /// Once registered, the consumer can expect to be notified as the battery life percentage changes.
+ ///
+ /// The consumer will receive a value between 0 and 100 (inclusive) which indicates percent battery life remaining.
+ ///
+ public static readonly Guid GUID_BATTERY_PERCENTAGE_REMAINING = new Guid("{A7AD8041-B45A-4CAE-87A3-EECBB468A9E1}");
+
+ ///
+ /// Global notification indicating to listeners user activity/presence across all sessions in the system (Present, NotPresent, Inactive)
+ ///
+ public static readonly Guid GUID_GLOBAL_USER_PRESENCE = new Guid("{786E8A1D-B427-4344-9207-09E70BDCBEA9}");
+
+ ///
+ /// Notification to listeners that the system is fairly busy and won't be moving into an idle state any time soon. This can be used
+ /// as a hint to listeners that now might be a good time to do background tasks.
+ ///
+ public static readonly Guid GUID_IDLE_BACKGROUND_TASK = new Guid("{515C31D8-F734-163D-A0FD-11A08C91E8F1}");
+
+ ///
+ /// Specifies the current state of the lid (open or closed). The callback won't be called at all until a lid device is found and its
+ /// current state is known.
+ ///
+ /// Values:
+ ///
+ public static readonly Guid GUID_LIDSWITCH_STATE_CHANGE = new Guid("{BA3E0F4D-B817-4094-A2D1-D56379E6A0F3}");
+
///
/// Session specific notification indicating to listeners whether or not the display related to the given session is on/off/dim
///
@@ -755,115 +920,13 @@ namespace Vanara.PInvoke
///
public static readonly Guid GUID_SESSION_USER_PRESENCE = new Guid("{3c0f4548-c03f-4c4d-b9f2-237ede686376}");
- ///
- /// Specifies an idle threshold percentage (0-100). The system must be this idle over a period of time in order to idle to sleep.
- ///
- /// N.B. DEPRECATED IN WINDOWS 6.1
- ///
- public static readonly Guid GUID_SLEEP_IDLE_THRESHOLD = new Guid("{81cd32e0-7833-44f3-8737-7081f38d1f70}");
-
- ///
- /// Specifies the subgroup which will contain all of the sleep settings for a single policy. { 238C9FA8-0AAD-41ED-83F4-97BE242C8F20 }
- ///
- public static readonly Guid GUID_SLEEP_SUBGROUP = new Guid("{238C9FA8-0AAD-41ED-83F4-97BE242C8F20}");
-
- /// Specifies (in a POWER_ACTION_POLICY structure) the appropriate action to take when the system sleep button is pressed.
- public static readonly Guid GUID_SLEEPBUTTON_ACTION = new Guid("{96996BC0-AD50-47EC-923B-6F41874DD9EB}");
-
/// Specifies a change (start/end) in System Power Report's Active Session.
public static readonly Guid GUID_SPR_ACTIVE_SESSION_CHANGE = new Guid("{0E24CE38-C393-4742-BDB1-744F4B9EE08E}");
- /// Defines a guid to control Standby Budget Grace Period.
- public static readonly Guid GUID_STANDBY_BUDGET_GRACE_PERIOD = new Guid("{60C07FE1-0556-45CF-9903-D56E32210242}");
+ /// Specifies whether mixed reality mode is engaged.
+ public static readonly Guid GUID_MIXED_REALITY_MODE = new Guid("{1E626B4E-CF04-4f8d-9CC7-C97C5B0F2391}");
- /// Defines a guid to control Standby Budget Percent.
- public static readonly Guid GUID_STANDBY_BUDGET_PERCENT = new Guid("{9fe527be-1b70-48da-930d-7bcf17b44990}");
-
- /// Defines a guid to control Standby Reserve Grace Period.
- public static readonly Guid GUID_STANDBY_RESERVE_GRACE_PERIOD = new Guid("{c763ee92-71e8-4127-84eb-f6ed043a3e3d}");
-
- /// Defines a guid to control Standby Reserve Time.
- public static readonly Guid GUID_STANDBY_RESERVE_TIME = new Guid("{468FE7E5-1158-46EC-88bc-5b96c9e44fd0}");
-
- /// Defines a guid to control Standby Reset Percentage.
- public static readonly Guid GUID_STANDBY_RESET_PERCENT = new Guid("{49cb11a5-56e2-4afb-9d38-3df47872e21b}");
-
- /// Specifies (in seconds) how long we wait after the system is deemed "idle" before moving to standby (S1, S2 or S3).
- public static readonly Guid GUID_STANDBY_TIMEOUT = new Guid("{29F6C1DB-86DA-48C5-9FDB-F2B67B1F44DA}");
-
- /// Specifies if the system is entering or exiting 'away mode'. 98A7F580-01F7-48AA-9C0F-44352C29E5C0
- public static readonly Guid GUID_SYSTEM_AWAYMODE = new Guid("{98A7F580-01F7-48AA-9C0F-44352C29E5C0}");
-
- /// Specifies the subgroup which will contain all of the system button settings for a single policy.
- public static readonly Guid GUID_SYSTEM_BUTTON_SUBGROUP = new Guid("{4F971E89-EEBD-4455-A8DE-9E59040E7347}");
-
- ///
- /// Specifies active vs passive cooling. Although not directly related to processor settings, it is the processor that gets throttled
- /// if we're doing passive cooling, so it is fairly strongly related. {94D3A615-A899-4AC5-AE2B-E4D8F634367F}
- ///
- public static readonly Guid GUID_SYSTEM_COOLING_POLICY = new Guid("{94D3A615-A899-4AC5-AE2B-E4D8F634367F}");
-
- /// Typical Power Savings - indicates that fairly aggressive power savings measures will be used.
- public static readonly Guid GUID_TYPICAL_POWER_SAVINGS = new Guid("{381B4222-F694-41F0-9685-FF5BB260DF2E}");
-
- ///
- /// Specifies (in seconds) how long the system should go back to sleep after waking unattended. 0 indicates that the standard
- /// standby/hibernate idle policy should be used instead.
- ///
- public static readonly Guid GUID_UNATTEND_SLEEP_TIMEOUT = new Guid("{7bc4a2f9-d8fc-4469-b07b-33eb785aaca0}");
-
- /// Defines a guid to control User Presence Prediction mode.
- public static readonly Guid GUID_USER_PRESENCE_PREDICTION = new Guid("{82011705-FB95-4D46-8D35-4042B1D20DEF}");
-
- ///
- /// Specifies (in a POWER_ACTION_POLICY structure) the appropriate action to take when the system sleep button is pressed.
- ///
- public static readonly Guid GUID_USERINTERFACEBUTTON_ACTION = new Guid("{A7066653-8D6C-40A8-910E-A1F54B84C7E5}");
-
- /// Specifies if the operating system should use ambient light sensor to change adaptively the display's brightness.
- public static readonly Guid GUID_VIDEO_ADAPTIVE_DISPLAY_BRIGHTNESS = new Guid("{FBD9AA66-9553-4097-BA44-ED6E9D65EAB8}");
-
- ///
- /// Specifies how much adaptive dim time out will be increased by.
- ///
- /// N.B. This setting is DEPRECATED in Windows 8.1
- ///
- public static readonly Guid GUID_VIDEO_ADAPTIVE_PERCENT_INCREASE = new Guid("{EED904DF-B142-4183-B10B-5A1197A37864}");
-
- /// Specifies if the operating system should use adaptive timers (based on previous behavior) to power down the video.
- public static readonly Guid GUID_VIDEO_ADAPTIVE_POWERDOWN = new Guid("{90959D22-D6A1-49B9-AF93-BCE885AD335B}");
-
- ///
- /// Specifies whether adaptive display dimming is turned on or off.
- ///
- /// N.B. This setting is DEPRECATED in Windows 8.1
- ///
- public static readonly Guid GUID_VIDEO_ANNOYANCE_TIMEOUT = new Guid("{82DBCF2D-CD67-40C5-BFDC-9F1A5CCD4663}");
-
- ///
- /// Specifies the video power down timeout (in seconds) after the interactive console is locked (and sensors indicate
- /// UserNotPresent). Value 0 effectively disables this feature.
- ///
- public static readonly Guid GUID_VIDEO_CONSOLE_LOCK_TIMEOUT = new Guid("{8ec4b3a5-6868-48c2-be75-4f3044be88a7}");
-
- /// Current monitor brightness.
- public static readonly Guid GUID_VIDEO_CURRENT_MONITOR_BRIGHTNESS = new Guid("{8ffee2c6-2d01-46be-adb9-398addc5b4ff}");
-
- /// Specifies (in seconds) how long we wait after the last user input has been received before we dim the video.
- public static readonly Guid GUID_VIDEO_DIM_TIMEOUT = new Guid("{17aaa29b-8b43-4b94-aafe-35f64daaf1ee}");
-
- /// Specifies (in seconds) how long we wait after the last user input has been received before we power off the video.
- public static readonly Guid GUID_VIDEO_POWERDOWN_TIMEOUT = new Guid("{3C0BC021-C8A8-4E07-A973-6B14CBCB2B7E}");
-
- /// Specifies the subgroup which will contain all of the video settings for a single policy.
- public static readonly Guid GUID_VIDEO_SUBGROUP = new Guid("{7516B95F-F776-4464-8C53-06167F40CC99}");
-
- ///
- /// This is a special GUID that represents "no subgroup" of settings. That is, it indicates that settings that are in the root of the
- /// power policy hierarchy as opposed to settings that are buried under a subgroup of settings. This should be used when querying for
- /// power settings that may not fall into a subgroup.
- ///
- public static readonly Guid NO_SUBGROUP_GUID = new Guid("{FEA3413E-7E05-4911-9A71-700331F1C294}");
+ #endregion
/// The level of user notification.
[PInvokeData("winnt.h", MSDNShortId = "70739f46-54be-4748-8993-ffee3b2a8b6c")]
@@ -927,10 +990,8 @@ namespace Vanara.PInvoke
}
///
- ///
/// Indicates the OEM's preferred power management profile. These values are read from the Preferred_PM_Profile field of the Fixed
/// ACPI Description Table (FADT). These values are returned by the PowerDeterminePlatformRole or PowerDeterminePlatformRoleEx function.
- ///
///
// https://docs.microsoft.com/en-us/windows/desktop/api/winnt/ne-winnt-_power_platform_role typedef enum _POWER_PLATFORM_ROLE {
// PlatformRoleUnspecified, PlatformRoleDesktop, PlatformRoleMobile, PlatformRoleWorkstation, PlatformRoleEnterpriseServer,
@@ -1068,7 +1129,7 @@ namespace Vanara.PInvoke
///
///
///
- public uint Flags;
+ public PowerActionFlags Flags;
///
/// The level of user notification. This member can be one or more of the following values.
@@ -1106,6 +1167,41 @@ namespace Vanara.PInvoke
public EventCode EventCode;
}
+ [PInvokeData("winnt.h", MSDNShortId = "70739f46-54be-4748-8993-ffee3b2a8b6c")]
+ [Flags]
+ public enum PowerActionFlags : uint
+ {
+ /// Has no effect.
+ POWER_ACTION_QUERY_ALLOWED = 0x00000001,
+ /// Applications can prompt the user for directions on how to prepare for suspension. Sets bit 0 in the Flags parameter passed in
+ /// the lParam parameter of WM_POWERBROADCAST.
+ POWER_ACTION_UI_ALLOWED = 0x00000002,
+ /// Has no effect.
+ POWER_ACTION_OVERRIDE_APPS = 0x00000004,
+ ///
+ POWER_ACTION_HIBERBOOT = 0x00000008,
+ ///
+ POWER_ACTION_USER_NOTIFY = 0x00000010,
+ ///
+ POWER_ACTION_DOZE_TO_HIBERNATE = 0x00000020,
+ ///
+ POWER_ACTION_ACPI_CRITICAL = 0x01000000,
+ ///
+ POWER_ACTION_ACPI_USER_NOTIFY = 0x02000000,
+ ///
+ POWER_ACTION_DIRECTED_DRIPS = 0x04000000,
+ ///
+ POWER_ACTION_PSEUDO_TRANSITION = 0x08000000,
+ /// Uses the first lightest available sleep state.
+ POWER_ACTION_LIGHTEST_FIRST = 0x10000000,
+ /// Requires entry of the system password upon resume from one of the system standby states.
+ POWER_ACTION_LOCK_CONSOLE = 0x20000000,
+ /// Disables all wake events.
+ POWER_ACTION_DISABLE_WAKES = 0x40000000,
+ /// Forces a critical suspension.
+ POWER_ACTION_CRITICAL = 0x80000000,
+ }
+
/// Contains information about processor performance control and C-states.
// https://docs.microsoft.com/en-us/windows/desktop/api/winnt/ns-winnt-_processor_power_policy typedef struct _PROCESSOR_POWER_POLICY
// { DWORD Revision; BYTE DynamicThrottle; BYTE Spare[3]; DWORD DisableCStates : 1; DWORD Reserved : 31; DWORD PolicyCount;