Export (0) Print
Expand All
Expand Minimize

CanUserWritePwrScheme function

[CanUserWritePwrScheme is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions. Applications written for Windows Vista and later should use PowerSettingAccessCheck instead.]

Determines whether the current user has sufficient privilege to write a power scheme.

Syntax


BOOLEAN WINAPI CanUserWritePwrScheme(void);

Parameters

This function has no parameters.

Return value

If the current user has sufficient privilege to write a power scheme, the function returns TRUE.

If the function fails, the return value is zero. To get extended error information, call GetLastError. Possible error values include the following.

ErrorMeaning
ERROR_ACCESS_DENIED

The current user does not have sufficient privilege to write a power scheme.

 

Remarks

This function is useful if your application is impersonating a user.

For more information on using PowrProf.h, see Power Schemes.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

PowrProf.h

Library

PowrProf.lib

DLL

PowrProf.dll

See also

Power Schemes
Power Management Functions
WritePwrScheme

 

 

Community Additions

ADD
Show:
© 2014 Microsoft