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

# XStoreQueryPackageIdentifier

> XStoreQueryPackageIdentifier

Retrieves the package identifier for the specified store ID.

## Syntax

```cpp theme={null}
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)](https://docs.xbox.com/publishing/xstore-commerce/xstore-dlc.md).

### 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](https://docs.xbox.com/reference/system/xstore/functions/xstoredownloadandinstallpackagesasync.md).

To get the result of a call to `XStoreDownloadAndInstallPackagesAsync`, call [XStoreDownloadAndInstallPackagesResult](https://docs.xbox.com/reference/system/xstore/functions/xstoredownloadandinstallpackagesresult.md).

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

## Requirements

**Header:** XStore.h

**Library:** xgameruntime.lib

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

## See also

[XStore](https://docs.xbox.com/reference/system/xstore/xstore_members.md)


## Related topics

- [XStore (API contents)](https://docs.xbox.com/reference/system/xstore/xstore_members.md)
- [Using C# wrappers for GDK APIs in your Unity project](https://docs.xbox.com/build/gdk-and-engines/unity/unity-api-wrappers.md)
- [XStoreQueryPackageUpdatesAsync](https://docs.xbox.com/reference/system/xstore/functions/xstorequerypackageupdatesasync.md)
- [XStoreQueryProductForPackageAsync](https://docs.xbox.com/reference/system/xstore/functions/xstorequeryproductforpackageasync.md)
- [XStoreQueryProductForPackageResult](https://docs.xbox.com/reference/system/xstore/functions/xstorequeryproductforpackageresult.md)
