XPackageGetCurrentProcessPackageIdentifier

Returns an installation identity string that identifies the installation for this process.

Syntax

HRESULT XPackageGetCurrentProcessPackageIdentifier(  
         size_t bufferSize,  
         char* buffer  
)  

Parameters

bufferSize   _In_
Type: size_t

The size of the buffer in the buffer parameter.

buffer   _Out_writes_(bufferSize)
Type: char*

On return, contains an installation identity string that identifies the installation for this process.

Return value

Type: HRESULT

HRESULT success or error code.

Remarks

The XPackageGetCurrentProcessPackageIdentifier function returns a package identifier string that is used to query this process's installation. The string's length must not be greater than the XPACKAGE_IDENTIFIER_MAX_LENGTH object. For more information about package identifiers, see Manage and license downloadable content (DLC).

Refer to the following code example:

char id[XPACKAGE_IDENTIFIER_MAX_LENGTH];

HRESULT hr = XPackageGetCurrentProcessPackageIdentifier(_countof(id), id);

For information about the packaging technology used with Xbox One titles, see Overview of Packaging. For information about the steps to create an XVC package, see Getting started packaging titles for Xbox consoles.

Requirements

Header: XPackage.h

Library: xgameruntime.lib

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

See also

Streaming Installation and Intelligent Delivery
XPackage