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

# XStoreQueryPackageIdentifier

Récupère l'identificateur de package pour l'ID Store spécifié.

## Syntaxe

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

### Paramètres

*storeId*   \_In\_z\_\
Type : char\*

ID, dans le Store, du produit qui contient le package.

*size*   \_In\_\
Type : size\_t

Nombre de caractères de l'identificateur de package. Cette taille doit être d'au moins XPACKAGE\_IDENTIFIER\_MAX\_LENGTH (33)
caractères.

*packageIdentifier*   \_Out\_writes\_z\_(size)\
Type : char\*

En cas de réussite, contient l'identificateur de package. Pour plus d'informations sur les identificateurs de package, consultez [Gérer le contenu téléchargeable (DLC) et ses licences](https://docs.xbox.com/fr-CA/publishing/xstore-commerce/xstore-dlc.md).

### Valeur de retour

Type : HRESULT

Retourne **S\_OK** en cas de réussite; sinon, retourne un code d'erreur.

| Code d'erreur | Description |
| - | - |
| 0x80070057 `E_INVALIDARG` | Aucun package installé ne correspond à l'ID Store |

## Remarques

Pour télécharger et installer les packages du Store spécifiés, appelez [XStoreDownloadAndInstallPackagesAsync](https://docs.xbox.com/fr-CA/reference/system/xstore/functions/xstoredownloadandinstallpackagesasync.md).

Pour obtenir le résultat d'un appel à `XStoreDownloadAndInstallPackagesAsync`, appelez [XStoreDownloadAndInstallPackagesResult](https://docs.xbox.com/fr-CA/reference/system/xstore/functions/xstoredownloadandinstallpackagesresult.md).

Pour obtenir le nombre d'éléments du résultat retourné par `XStoreDownloadAndInstallPackagesResult`, appelez [XStoreDownloadAndInstallPackagesResultCount](https://docs.xbox.com/fr-CA/reference/system/xstore/functions/xstoredownloadandinstallpackagesresultcount.md).

## Configuration requise

**En-tête :** XStore.h

**Bibliothèque :** xgameruntime.lib

**Plateformes prises en charge :** Windows, consoles de la famille XBOX One et consoles XBOX Series

## Voir aussi

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


## Related topics

- [XStore (contenu de l'API)](https://docs.xbox.com/fr-CA/reference/system/xstore/xstore_members.md)
- [Utilisation des wrappers C# pour les API du GDK dans votre projet Unity](https://docs.xbox.com/fr-CA/build/gdk-and-engines/unity/unity-api-wrappers.md)
- [XStoreQueryPackageUpdatesAsync](https://docs.xbox.com/fr-CA/reference/system/xstore/functions/xstorequerypackageupdatesasync.md)
- [XStoreQueryProductForPackageAsync](https://docs.xbox.com/fr-CA/reference/system/xstore/functions/xstorequeryproductforpackageasync.md)
- [XStoreQueryProductForPackageResult](https://docs.xbox.com/fr-CA/reference/system/xstore/functions/xstorequeryproductforpackageresult.md)
