Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
PowerSettingAccessCheckEx function (powrprof.h)
Queries for a group policy override for specified power settings and specifies the requested access for the setting.
Syntax
DWORD PowerSettingAccessCheckEx(
[in] POWER_DATA_ACCESSOR AccessFlags,
[in, optional] const GUID *PowerGuid,
[in] REGSAM AccessType
);
Parameters
[in] AccessFlags
The type of access to check for group policy overrides.
| Value | Meaning |
|---|---|
|
Check for overrides on AC power settings. |
|
Check for overrides on DC power settings. |
|
Check for restrictions on specific power schemes. |
|
Check for restrictions on active power schemes. |
|
Check for restrictions on creating or restoring power schemes. |
[in, optional] PowerGuid
The identifier of the power setting.
[in] AccessType
The type of security access for the setting. For more information, see Registry Key Security and Access Rights.
This parameter can be one of the following values.
| Value | Meaning |
|---|---|
|
Combines the STANDARD_RIGHTS_READ, KEY_QUERY_VALUE, KEY_ENUMERATE_SUB_KEYS, and KEY_NOTIFY values. |
|
Combines the STANDARD_RIGHTS_WRITE, KEY_SET_VALUE, and KEY_CREATE_SUB_KEY access rights. |
Return value
Returns ERROR_SUCCESS (zero) if the call was successful, and a nonzero value if the call failed.
| Return code/value | Description |
|---|---|
|
The specified power setting is not currently overridden by a group policy. |
|
This program is blocked by group policy. For more information, contact your system administrator. |
|
Only Administrators can remotely access power settings. |
Requirements
| Requirement | Value |
|---|---|
| Minimum supported client | Windows 7 [desktop apps only] |
| Minimum supported server | Windows Server 2008 R2 [desktop apps only] |
| Target Platform | Windows |
| Header | powrprof.h |
| Library | Powrprof.lib |
| DLL | Powrprof.dll |
Feedback
Was this page helpful?
