PowerDeterminePlatformRole function (powrprof.h)
Determines the computer role for Windows 7, Windows Server 2008 R2, Windows Vista or Windows Server 2008. To specify a different platform, use the PowerDeterminePlatformRoleEx function.
To query additional power platform roles defined after Windows 7 and Windows Server 2008 R2, use PowerDeterminePlatformRoleEx.
Syntax
POWER_PLATFORM_ROLE PowerDeterminePlatformRole();
Return value
The return value is one of the values from the POWER_PLATFORM_ROLE enumeration.
Remarks
This function reads the ACPI Fixed ACPI Description Table (FADT) to determine the OEM preferred computer role. If that information is not available, the function looks for a battery. If at least one battery is available, the function returns PlatformRoleMobile. If no batteries are available, the function returns PlatformRoleDesktop.
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 |