> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XStoreQueryPackageIdentifier

> XStoreQueryPackageIdentifier

# XStoreQueryPackageIdentifier

Retrieves the package identifier for the specified store ID.

<a id="syntaxSection" />

## Syntax

```cpp theme={null}
HRESULT XStoreQueryPackageIdentifier(
         const char* storeId,
         size_t size,
         char* packageIdentifier
)
```

<a id="parametersSection" />

### 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)](/publishing/xstore-commerce/xstore-dlc).

<a id="retvalSection" />

### 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 |

<a id="remarksSection" />

## Remarks

To download and install the specified store packages, call [XStoreDownloadAndInstallPackagesAsync](/reference/system/xstore/functions/xstoredownloadandinstallpackagesasync).

To get the result of a call to `XStoreDownloadAndInstallPackagesAsync`, call [XStoreDownloadAndInstallPackagesResult](/reference/system/xstore/functions/xstoredownloadandinstallpackagesresult).

To get the number of items in the result that is returned by `XStoreDownloadAndInstallPackagesResult`, call [XStoreDownloadAndInstallPackagesResultCount](/reference/system/xstore/functions/xstoredownloadandinstallpackagesresultcount).

<a id="requirementsSection" />

## Requirements

**Header:** XStore.h

**Library:** xgameruntime.lib

**Supported platforms:** Windows, XBOX One family consoles and XBOX Series consoles

<a id="seealsoSection" />

## See also

[XStore](/reference/system/xstore/xstore_members)


## Related topics

- [XStore](/reference/system/xstore/xstore_members.md)
- [Unity C# API wrappers for the GDK](/build/gdk-and-engines/unity/unity-api-wrappers.md)
- [XStoreQueryPackageUpdatesAsync](/reference/system/xstore/functions/xstorequerypackageupdatesasync.md)
- [XStoreQueryProductForPackageAsync](/reference/system/xstore/functions/xstorequeryproductforpackageasync.md)
- [XStoreQueryProductForPackageResult](/reference/system/xstore/functions/xstorequeryproductforpackageresult.md)
