> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XGameStreamingInitialize

> XGameStreamingInitialize

Initalizes the Game Streaming APIs.

## Syntax

```cpp theme={null}
HRESULT XGameStreamingInitialize(  
)  
```

### Parameters

None

### Return value

Type: HRESULT

Returns S\_OK if successful; otherwise, returns an error code.  For a list of error codes, see [Error Codes](https://docs.xbox.com/reference/errorcodes.md).

## Remarks

> [!NOTE]
>
> This function isn't safe to call on a time-sensitive thread. For more information, see [Time-sensitive threads](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads).

This API must be called before calling most of the other XGameStreaming APIs.  Other APIs will return `E_GAMESTREAMING_NOT_INITIALIZED` if this API has not been called.

## Requirements

**Header:** XGameStreaming.h

**Library:** xgameruntime.lib

**Supported platforms:** Windows, XBOX One family consoles and XBOX Series consoles

## Conceptual documentation

* [Time-sensitive threads](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads)

## See also

[XGameStreamingUninitialize](https://docs.xbox.com/reference/system/xgamestreaming/functions/xgamestreaminguninitialize.md)\
[XGameStreaming](https://docs.xbox.com/reference/system/xgamestreaming/xgamestreaming_members.md)


## Related topics

- [XGameStreamingUninitialize](https://docs.xbox.com/reference/system/xgamestreaming/functions/xgamestreaminguninitialize.md)
- [XGameStreaming (API contents)](https://docs.xbox.com/reference/system/xgamestreaming/xgamestreaming_members.md)
- [XGameStreamingSetResolution](https://docs.xbox.com/reference/system/xgamestreaming/functions/xgamestreamingsetresolution.md)
- [XGameStreamingRegisterConnectionStateChanged](https://docs.xbox.com/reference/system/xgamestreaming/functions/xgamestreamingregisterconnectionstatechanged.md)
- [XGameStreamingGetClients](https://docs.xbox.com/reference/system/xgamestreaming/functions/xgamestreaminggetclients.md)
