Skip to main content

XtfGetTitleOSState

Get information about the running game, including its state, process ID, package full name, and Application User Model IDs (AUMIDs).

Syntax

Parameters

address
Type: PCWSTR
[in] The address of the console. titleStateFlags
Type: UINT32*
[out, optional] A bitwise-OR combination of flags that provide additional information about the game. If this value is not required, set this to nullptr. This parameter supports the following flags: pid
Type: UINT32*
[out, optional] The process ID of the game, if the game is currently running; otherwise, zero. If this value is not required, set this to nullptr. packageFullName
Type: PWSTR
[out, optional] The package full name of the game, if the game is currently running; otherwise, an empty string (""). If this value is not required or if the buffer length is required, set this to nullptr. packageFullNameLength
Type: UINT32*
[out, optional] The length of the buffer required for packageFullName in WCHAR. If this value is not required, set this to nullptr. aumid
Type: PWSTR
[out, optional] The AUMID of the game, if the game is currently running; otherwise, an empty string (""). If this value is not required, set this to nullptr. aumidLength
Type: UINT32*
[out, optional] The length of the buffer required for aumid in WCHAR. If this value is not required, set this to nullptr.

Return value

Type: HRESULT Returns S_OK if successful; otherwise, returns an HRESULT error code. Returns HRESULT_FROM_WIN32(ERROR_MORE_DATA) if packageFullName or aumid buffers are too small.

Remarks

This function returns information about the state of the currently running game, including title state flags, process ID, package full name, and Application User Model ID (AUMID). For more information about packaging, see Packaging. To retrieve the required buffer lengths for the packageFullName and aumid buffers, perform the following steps:
  1. Set packageFullName and aumid parameters to nullptr
  2. Set packageFullNameLength and aumidLength parameters to valid UINT32 pointers
  3. Call XtfGetTitleOSState
If the function runs successfully, the packageFullNameLength and aumidLength parameters contain the required buffer lengths, in WCHAR, for packageFullName and aumidLength, respectively.

Requirements

Header: xtfapi.h Library: XtfApi.lib Supported platforms: Windows (for XBOX console tools)

See also

XtfGetAumid
XtfGetPackageFullName
XTF Transport Errors (NDA topic)
Additional Xtf APIs
Last modified on August 20, 2026