Skip to main content

XtfWaitForConsoleState

Blocks execution until either the specified console states are reached or a timeout occurs.

Syntax

Parameters

address
Type: PCWSTR
[in] The address of the console. consoleState
Type: UINT32
[in] A bitwise-OR combination of flags that indicate the current state of the console. This parameter supports the following flags: timeoutMS
Type: UINT32
[in] The timeout, in milliseconds, before the function returns ERROR_TIMEOUT.

Return value

Type: HRESULT Returns S_OK if successful; otherwise, returns one of the following HRESULT error codes.

Remarks

This function loops every 250 milliseconds, validating the current state of the console against the states specified in consoleState. If the states specified in consoleState don’t match the current state of the console within the time specified in timeoutMS, the function returns ERROR_TIMEOUT; otherwise, the function stops looping and returns S_OK. For more information about the System OS and Game OS, see For a complete introduction, see What is the Microsoft Game Development Kit? (NDA topic).

Requirements

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

See also

XTF Transport Errors (NDA topic)
Additional Xtf APIs
Last modified on October 19, 2026