XGameStreamingGetClientIPAddress
Deprecated. This API is deprecated as of the 2604 GDK release and will be removed in a future GDK release. On the current XBOX Cloud Gaming streaming stack, this API is non-functional and returns
E_GAMESTREAMING_NO_DATA on success.If your title needs to determine whether it’s running on an XBOX Game Streaming server, or needs the user’s approximate geographic location, use XSTS token claims instead.Syntax
Parameters
client _In_Type: XGameStreamingClientId The streaming client that is being queried. ipAddressSize _In_
Type: size_t The maximum size of the
ipAddress buffer that is being provided. Typically the value of this should just be the ClientIPAddressMaxBytes.
ipAddress _Out_writes_z_(ipAddressSize)Type: char* The buffer that will be populated with the IP address of the specified client.
Return value
Type: HRESULT Returns S_OK if successful; otherwise, returns an error code.Potential Errors
For a list of error codes, see Error Codes.
Remarks
TheipAddress can be either an IPv4 address (1.2.3.4) or an IPv6 address (1:2:3:4:5:6:7:8). ParseNetworkString can be used to parse the string if desired.
The IP address returned is what the XBOX has received from the streaming client. If the streaming client is using a VPN or is behind a NAT then utilizing the IP address for geolocation may have issues.
Private IP addresses may be returned during development or remote play scenarios where the streaming client and the XBOX are on the same private network.
Example
Requirements
Header: xgamestreaming.hLibrary: xgameruntime.lib
Supported platforms: Windows, XBOX One family consoles and XBOX Series consoles
