Returns the ID of the current console.
HRESULT GetConsoleId(
PWSTR pwszConsoleId,
size_t cchConsoleId
)
pwszConsoleId
Type: PWSTR
[out] The console ID.
cchConsoleId
Type: size_t
[in] The size of the console ID.
Type: HRESULT
GetConsoleId returns personally identifying information, and is disabled in retail applications. If your code attempts to call GetConsoleId on a console that does not have an XDK dev kit certificate, the call fails, returning E_ACCESSDENIED. Your code can use GetConsoleId during development and testing to identify the console locally, but the console ID should not be transmitted off the console.
Header: Declared in consoleid.h.
Library: Use consoleid.lib.