XtfGetTitleOSState
Get information about the running game, including its state, process ID, package full name, and Application User Model IDs (AUMIDs).Syntax
Parameters
addressType: 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.
packageFullNameType: 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.
packageFullNameLengthType: UINT32* [out, optional] The length of the buffer required for packageFullName in WCHAR. If this value is not required, set this to
nullptr.
aumidType: 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.
aumidLengthType: 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 ReturnsS_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 thepackageFullName and aumid buffers, perform the following steps:
- Set
packageFullNameandaumidparameters tonullptr - Set
packageFullNameLengthandaumidLengthparameters to valid UINT32 pointers - Call
XtfGetTitleOSState
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
XtfGetAumidXtfGetPackageFullName
XTF Transport Errors (NDA topic)
Additional Xtf APIs
