Partager via


XStoreQueryPackageIdentifier

Retrieves the package identifier for the specified store ID.

Syntax

HRESULT XStoreQueryPackageIdentifier(
         const char* storeId,
         size_t size,
         char* packageIdentifier
)

Parameters

storeId   _In_z_
Type: char*

The ID in the store of the product that contains the package.

size   _In_
Type: size_t

The number of characters in the package identifier. This size must be at least XPACKAGE_IDENTIFIER_MAX_LENGTH (33) in size.

packageIdentifier   _Out_writes_z_(size)
Type: char*

Upon success, contains the package identifier. For more information about package identifiers, see Manage and license downloadable content (DLC).

Return value

Type: HRESULT

Returns S_OK upon success, or an error code otherwise.

Error code Description
0x80070057 E_INVALIDARG There is no installed package corresponding to the Store ID

Remarks

To download and install the specified store packages, call XStoreDownloadAndInstallPackagesAsync.

To get the result of a call to XStoreDownloadAndInstallPackagesAsync, call XStoreDownloadAndInstallPackagesResult.

To get the number of items in the result that is returned by XStoreDownloadAndInstallPackagesResult, call XStoreDownloadAndInstallPackagesResultCount.

Requirements

Header: XStore.h

Library: xgameruntime.lib

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

See also

XStore