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

# XGameStreamingInitialize

> 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](/reference/errorcodes).

## 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).</Note>

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](/reference/system/xgamestreaming/functions/xgamestreaminguninitialize)\
[XGameStreaming](/reference/system/xgamestreaming/xgamestreaming_members)


## Related topics

- [XGameStreaming](/reference/system/xgamestreaming/xgamestreaming_members.md)
- [XGameStreamingUninitialize](/reference/system/xgamestreaming/functions/xgamestreaminguninitialize.md)
- [XGameStreamingRegisterConnectionStateChanged](/reference/system/xgamestreaming/functions/xgamestreamingregisterconnectionstatechanged.md)
- [XGameStreamingSetResolution](/reference/system/xgamestreaming/functions/xgamestreamingsetresolution.md)
- [XGameStreamingGetClients](/reference/system/xgamestreaming/functions/xgamestreaminggetclients.md)
