Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Duplicates an existing power scheme.
Syntax
DWORD PowerDuplicateScheme(
[in, optional] HKEY RootPowerKey,
[in] const GUID *SourceSchemeGuid,
[in] GUID **DestinationSchemeGuid
);
Parameters
[in, optional] RootPowerKey
This parameter is reserved for future use and must be set to NULL.
[in] SourceSchemeGuid
The identifier of the power scheme that is to be duplicated.
[in] DestinationSchemeGuid
The address of a pointer to a GUID. If the pointer contains NULL, the function allocates memory for a new GUID and puts the address of this memory in the pointer. The caller can free this memory using LocalFree.
Return value
Returns ERROR_SUCCESS (zero) if the call was successful, and a nonzero value if the call failed.
Return code/value | Description |
---|---|
|
The power scheme was successfully duplicated. |
|
One of the parameters is not valid. |
|
The DestinationSchemeGuid parameter refers to an existing power scheme. PowerDeleteScheme can be used to delete this scheme. |
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2008 [desktop apps only] |
Target Platform | Windows |
Header | powrprof.h |
Library | PowrProf.lib |
DLL | PowrProf.dll |