Expand Minimize

PowerDeterminePlatformRole function

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 WINAPI PowerDeterminePlatformRole(void);

Parameters

This function has no parameters.

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.

Note  This API has a newer version. To query additional power platform roles defined after Windows 7 and Windows Server 2008 R2, use PowerDeterminePlatformRoleEx.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

PowrProf.h

Library

PowrProf.lib

DLL

PowrProf.dll

See also

Power Management Functions
POWER_PLATFORM_ROLE
PowerDeterminePlatformRoleEx

 

 

Community Additions

ADD
Show:
© 2014 Microsoft