XSystemGetConsoleId
Returns the console ID of the current device.Syntax
Parameters
consoleIdSize _In_Type: size_t The size of the consoleId, in bytes. This value must be equal to or greater than the XSystemConsoleIdBytes constant defined in XSystem.h. consoleId _Out_writes_bytes_to_(consoleIdSize,*consoleIdUsed)
Type: char* The character buffer that will receive the console ID. consoleIdUsed _Out_opt_
Type: size_t* The size, in bytes, of the consoleId buffer returned.
Return value
Type: HRESULT Returns S_OK if successful; otherwise, returns an error code. For a list of error codes, see Error Codes. If the function fails because consoleIdSize is set to a value less than XSystemConsoleIdBytes, the return value is set to HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER).Remarks
This function isn’t safe to call on a time-sensitive thread. For more information, see Time-sensitive threads.
00000000.00000000.00000000.00000000.00. For PC devices, the console ID always defaults to 00000000.00000000.00000000.00000000.00.
In RETAIL, this function will always return 00000000.00000000.00000000.00000000.00. If the game is needing an identifier that can
be used in all situations including retail, there are two possibilties:
- If your application is using Single-Sign-On (SSO), you should the XSTS SSO token’s pairwise ID instead of the id returned by this function.
- Otherwise, use the XSystemGetAppSpecificDeviceId function.
Requirements
Header: XSystem.h Library: xgameruntime.lib Supported platforms: Windows, XBOX One family consoles and XBOX Series consolesConceptual documentation
See also
Activating your dev kit (NDA topic)XSystemGetXboxLiveSandbodId
XSystem
