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

# XtfRegisterPackage

> XtfRegisterPackage

# XtfRegisterPackage

Registra um pacote implantado na unidade temporária do título.

<a id="syntaxSection" />

## Sintaxe

```cpp theme={null}
HRESULT XtfRegisterPackage(
         LPCWSTR address,
         LPCWSTR titleScratchRelativePath,
         XtfPackageInfo* packageInfo
)  
```

<a id="parametersSection" />

### Parâmetros

*address*\
Tipo: LPCWSTR

\[in] O endereço do console.

*titleScratchRelativePath*\
Tipo: LPCWSTR

\[in] O caminho relativo na unidade temporária do título do pacote a ser registrado.

*packageInfo*\
Tipo: XtfPackageInfo\*

\[out] Objeto de informações do pacote sobre o pacote que foi registrado.

<a id="retvalSection" />

### Valor retornado

Tipo: HRESULT

Retorna `S_OK` se for bem-sucedido; caso contrário, retorna um código de erro HRESULT.

<a id="remarksSection" />

## Comentários

Essa função registra um pacote implantado na unidade temporária do título e fornece informações do pacote como uma referência de objeto `XtfPackageInfo`. Use as funções [XtfGetPackageFullName](/pt-BR/reference/tools/xtf/xtfapi/functions/xtfgetpackagefullname-xtfapi-xbox-windows-m), [XtfGetCountofAppUserModelIds](/pt-BR/reference/tools/xtf/xtfapi/functions/xtfgetcountofappusermodelids-xtfapi-xbox-windows-m) e [XtfGetAumid](/pt-BR/reference/tools/xtf/xtfapi/functions/xtfgetaumid-xtfapi-xbox-windows-m) para obter o nome completo do pacote e as AUMIDs (Application User Model IDs) do pacote registrado a partir do objeto `XtfPackageInfo`. Use [XtfClosePackageInfo](/pt-BR/reference/tools/xtf/xtfapi/functions/xtfclosepackageinfo-xtfapi-xbox-windows-m) para liberar o objeto `XtfPackageInfo` quando terminar de usá-lo.

Você também pode usar [XtfUnregisterPackage](/pt-BR/reference/tools/xtf/xtfapi/functions/xtfunregisterpackage-xtfapi-xbox-windows-m) para cancelar o registro de um pacote. Para obter mais informações sobre como gerenciar aplicativos, confira [Gerenciamento de aplicativos (xbapp.exe) (tópico sob NDA)](/pt-BR/tools/tools-console/commandlinetools/xbapp).

<a id="requirementsSection" />

## Requisitos

**Cabeçalho:** xtfapi.h

**Biblioteca:** XtfApi.lib

**Plataformas com suporte:** Windows (para ferramentas de console XBOX)

<a id="seealsoSection" />

## Confira também

[Erros de transporte do XTF (tópico sob NDA)](/pt-BR/tools/tools-console/commandlinetools/xtf-transport-errors)\
[APIs adicionais do Xtf](/pt-BR/reference/tools/xtf/xtfapi/atoc-xtfapi)


## Related topics

- [XtfUnregisterPackage](/pt-BR/reference/tools/xtf/xtfapi/functions/xtfunregisterpackage-xtfapi-xbox-windows-m.md)
- [XtfGetPackageFullName](/pt-BR/reference/tools/xtf/xtfapi/functions/xtfgetpackagefullname-xtfapi-xbox-windows-m.md)
- [XtfGetAumid](/pt-BR/reference/tools/xtf/xtfapi/functions/xtfgetaumid-xtfapi-xbox-windows-m.md)
- [XtfGetCountofAppUserModelIds](/pt-BR/reference/tools/xtf/xtfapi/functions/xtfgetcountofappusermodelids-xtfapi-xbox-windows-m.md)
- [XtfClosePackageInfo](/pt-BR/reference/tools/xtf/xtfapi/functions/xtfclosepackageinfo-xtfapi-xbox-windows-m.md)
