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

# XPackageGetPackageKind

> XPackageGetPackageKind

# XPackageGetPackageKind

Retorna o tipo de pacote de instalação identificado por um identificador de pacote.

## Sintaxe

```cpp theme={null}
HRESULT XPackageGetPackageKind(  
         _In_z_ const char* packageIdentifier,  
         _Out_ XPackageKind* kind  
)
```

### Parâmetros

*packageIdentifier*   \_In\_z\_\
Tipo: char\*

Uma cadeia de caracteres que identifica exclusivamente o pacote instalado no disco. Para obter mais informações sobre identificadores de pacote, consulte [Gerenciar e licenciar conteúdo para download (DLC)](/pt-BR/publishing/xstore-commerce/xstore-dlc).

*kind*   \_Out\_\
Tipo: [XPackageKind](/pt-BR/reference/system/xpackage/enums/xpackagekind)\*

No retorno, contém o valor de [XPackageKind](/pt-BR/reference/system/xpackage/enums/xpackagekind) que descreve o pacote.

### Valor retornado

Tipo: HRESULT

`S_OK` em caso de êxito; caso contrário, um código de erro.

## Comentários

Use `XPackageGetPackageKind` quando você tiver um identificador de pacote e precisar determinar se ele se refere a um jogo, a um pacote de conteúdo para download (DLC) ou a um pacote de Publisher Content. Quando você já souber o tipo com o qual deseja trabalhar, prefira passar o valor de [XPackageKind](/pt-BR/reference/system/xpackage/enums/xpackagekind) correspondente para [XPackageEnumeratePackages](/pt-BR/reference/system/xpackage/functions/xpackageenumeratepackages), para que a enumeração retorne somente os pacotes correspondentes.

Consulte o exemplo de código a seguir.

```cpp theme={null}
XPackageKind kind;
HRESULT hr = XPackageGetPackageKind(packageIdentifier, &kind);
if (SUCCEEDED(hr) && kind == XPackageKind::PublisherContent)
{
    // Handle Publisher Content.
}
```

## Requisitos

**Cabeçalho:** XPackage.h

**Plataformas compatíveis:** Windows, consoles da família XBOX One e consoles XBOX Series

## Confira também

[XPackage](/pt-BR/reference/system/xpackage/xpackage_members)\
[XPackageKind](/pt-BR/reference/system/xpackage/enums/xpackagekind)\
[XPackageEnumeratePackages](/pt-BR/reference/system/xpackage/functions/xpackageenumeratepackages)\
[Pacotes de Publisher Content](/pt-BR/build/core-features/common/packaging/packaging-publisher-content)


## Related topics

- [XPackageGetPackageKind](/reference/system/xpackage/functions/xpackagegetpackagekind.md)
- [Publisher Content packages](/build/core-features/common/packaging/packaging-publisher-content.md)
- [发布者内容包](/zh-CN/build/core-features/common/packaging/packaging-publisher-content.md)
- [Paquetes de Publisher Content](/es/build/core-features/common/packaging/packaging-publisher-content.md)
- [Publisher Content 패키지](/ko/build/core-features/common/packaging/packaging-publisher-content.md)
