XSystemGetXboxLiveSandboxId
Retrieves the Xbox Live sandbox ID.
Syntax
HRESULT XSystemGetXboxLiveSandboxId(
size_t sandboxIdSize,
char* sandboxId,
size_t* sandboxIdUsed
)
Parameters
sandboxIdSize _In_
Type: size_t
The size of the sandboxId, in bytes. This value must be equal to or greater than the XSystemXboxLiveSandboxIdMaxBytes constant defined in XSystem.h.
sandboxId _Out_writes_bytes_to_(sandboxIdSize,*sandboxIdUsed)
Type: char*
The character buffer that will receive the sandbox ID.
sandboxIdUsed _Out_opt_
Type: size_t*
The actual size, in bytes, of the sandboxId 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 sandboxIdSize is set to a value less than XSystemXboxLiveSandboxIdMaxBytes, the return value is set to HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER).
Remarks
Note
This function isn't safe to call on a time-sensitive thread. For more information, see Time-sensitive threads.
Together with the TitleID and the Service Configuration ID (SCID), the sandbox ID is critical to the development of Xbox Live titles and applications. The sandbox ID identifies your sandbox, which provides content isolation for your development kit during development. Content isolation ensures that you have a clean environment for developing and testing your title.
Note
Sandbox IDs are case sensitive.
For Xbox and PC devices, the sandbox ID is stored on the device. If the sandbox ID is not found, or you do not have permissions to access the sandbox ID, the sandbox ID defaults to 'RETAIL'.
This function will also return 'RETAIL' if in fact your game is running in the retail environment.
Requirements
Header: XSystem.h
Library: xgameruntime.lib
Supported platforms: Windows, Xbox One family consoles and Xbox Series consoles
See also
Configuring dev kit settings (NDA topic)Requiere autorización
Setting up sandboxes for Xbox Live development
XSystemGetConsoleId
XSystem