GetExpandedResourceExclusiveCpuCount function

Gets the expected number of exclusive CPU sets that are available to the app when in Game Mode.

Syntax


HRESULT WINAPI GetExpandedResourceExclusiveCpuCount(
  _Out_ ULONG *exclusiveCpuCount
);

Parameters

exclusiveCpuCount [out]

The expected number of exclusive CPU sets that are available to the app when in Game Mode.

Return value

The result of the operation.

Remarks

You can use this function to determine what resources are available to your app, and use this information to decide whether to enter Game Mode or shared mode.

This function returns 0 if no exclusive CPU sets are available, or if the customer opted out of Game Mode via the Settings in Windows 10.

This is a Win32 API that's only supported in UWP desktop and Xbox apps. It also requires the expandedResources restricted capability, which you can select by opening Package.appxmanifest in Visual Studio and navigating to the Capabilities tab. Alternatively, you can edit the file's code directly:



<Package
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
IgnorableNamespaces=" rescap">
	...
	<Capabilities>
		<rescap:Capability Name="expandedResources" />
	</Capabilities>
	...
</Package>

This capability is granted on a per-title basis; contact your account manager for more information. You can publish a UWP app with this capability to the Store if it targets desktop, but if it targets Xbox it will be rejected in certification.

The app must be in the foreground and have focus before exclusive resources are granted.

Requirements

Header

Expandedresources.h

Library

Windowsapp.lib

DLL

Gamemode.dll

 

 

Show: