Compartir a través de


XGameStreamingGetClients

Gets the ID of each currently connected client.

Syntax

HRESULT XGameStreamingGetClients(  
         uint32_t clientCount,  
         XGameStreamingClientId* clients,  
         uint32_t* clientsUsed  
)  

Parameters

clientCount   _In_
Type: uint32_t

Maximum number of clients to return in the clients array.

clients   _Out_writes_to_(clientCount,clientsUsed)
Type: XGameStreamingClientId

Buffer to store the connected client IDs.

clientsUsed   _Out_
Type: uint32_t*

The number of clients actually written to the clients array.

Return value

Type: HRESULT

Returns S_OK if successful; otherwise, returns an error code.

Potential Errors

Error Code Error Value Reason for Error
E_GAMESTREAMING_NOT_INITIALIZED 0x89245400 The XGameStreaming runtime has not been initialized. Call XGameStreamingInitialize before calling other APIs.
E_NOT_SUFFICIENT_BUFFER 0x7A The number specified in clientCount is smaller than the number of currently connected clients.

For a list of error codes, see Error Codes.

Remarks

Used to get the XGameStreamingClientId of every streaming client device that is currently connected.

If the game is only trying to identify if ANY device is connected and streaming, consider using XGameStreamingIsStreaming.

If the game needs to get notification when a streaming client connects and/or disconnects, consider using XGameStreamingRegisterConnectionStateChanged.

Requirements

Header: xgamestreaming.h

Library: xgameruntime.lib

Supported platforms: Windows, Xbox One family consoles and Xbox Series consoles

See also

XGameStreamingIsStreaming
XGameStreamingRegisterConnectionStateChanged
XGameStreamingGetClientCount
XGameStreaming