Expand Minimize

PowerDeterminePlatformRoleEx function

Determines the computer role for the specified platform.

Syntax


POWER_PLATFORM_ROLE WINAPI PowerDeterminePlatformRoleEx(
  _In_  ULONG Version
);

Parameters

Version [in]

The version of the POWER_PLATFORM_ROLE enumeration for the platform. This parameter can be one of the following values.

ValueMeaning
POWER_PLATFORM_ROLE_VERSION

The version of the POWER_PLATFORM_ROLE enumeration for the current build target.

POWER_PLATFORM_ROLE_V1

The version of the POWER_PLATFORM_ROLE enumeration for Windows 7, Windows Server 2008 R2, Windows Vista or Windows Server 2008.

Calling PowerDeterminePlatformRoleEx with this value returns the same result as calling PowerDeterminePlatformRole on Windows 7, Windows Server 2008 R2, Windows Vista or Windows Server 2008.

POWER_PLATFORM_ROLE_V2

The version of the POWER_PLATFORM_ROLE enumeration for Windows 8 and Windows Server 2012.

 

Return value

The return value is one of the values from the specified version of 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.

If the OEM preferred computer role is not supported on the platform specified by the caller, the function returns the closest supported value. For example, calling the PowerDeterminePlatformRoleEx function with a Version of POWER_PLATFORM_ROLE_V1 on a tablet device returns PlatformRoleMobile.

Requirements

Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]

Header

Powerbase.h

Library

Powrprof.lib

DLL

Powrprof.dll

See also

Power Management Functions
POWER_PLATFORM_ROLE
PowerDeterminePlatformRole

 

 

Community Additions

ADD
Show:
© 2014 Microsoft