GetConsoleId

Returns the ID of the current console.

Syntax

HRESULT GetConsoleId(
         PWSTR pwszConsoleId,
         size_t cchConsoleId
)  

Parameters

pwszConsoleId
Type: PWSTR 

[out] The console ID.

cchConsoleId
Type: size_t 

[in] The size of the console ID.

Return value

Type: HRESULT 

Remarks

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.

Requirements

Header: Declared in consoleid.h.

Library: Use consoleid.lib.