[DllImport("powrprof.dll")]
static extern uint PowerSetActiveScheme (IntPtr userRootPowerKey, ref Guid schemeGuid);
Declare Function PowerSetActiveScheme Lib "powrprof.dll" (TODO) As TODO
None.
Do you know one? Please contribute it!
Returns ERROR_SUCCESS (zero) if the call was successful, and a nonzero value if the call failed.
Please add some!
public static void PowerSetActiveScheme (Guid schemeGuid)
{
uint result = PowerSetActiveScheme(IntPtr.Zero, ref schemeGuid);
result (res != 0) throw new COMException($"Error occurred. Win32 error code: {res}");
}