XSystemGetAppSpecificDeviceId

Returns a unique value from the console that is specific to caller's title ID.

Syntax

HRESULT XSystemGetAppSpecificDeviceId(  
         size_t appSpecificDeviceIdSize,  
         char* appSpecificDeviceId,  
         size_t* appSpecificDeviceIdUsed  
)  

Parameters

appSpecificDeviceIdSize   _In_
Type: size_t

The size of the appSpecificDeviceId, in bytes. This value must be equal to or greater than the XSystemAppSpecificDeviceIdBytes constant defined in XSystem.h.

appSpecificDeviceId   _Out_writes_bytes_to_(appSpecificDeviceIdSize, *appSpecificDeviceIdUsed)
Type: char*

The character buffer that will receive the application specific device ID.

appSpecificDeviceIdUsed   _Out_opt_
Type: size_t*

The size, in bytes, of the appSpecificDeviceIdUsed 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 appSpecificDeviceIdSize is set to a value less than XSystemAppSpecificDeviceIdBytes, 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.

The constant string "00000000000000000000000000000000000000000000" will be returned in cases where the application specific device identifier could not be obtained due to an error.

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.

Requirements

Header: XSystem.h

Library: xgameruntime.lib

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

See also

Activating your dev kit (NDA topic)Otorisasi diperlukan
XSystemGetXboxLiveSandbodId
XSystem