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

# XtfGetPackageFullName

> XtfGetPackageFullName

# XtfGetPackageFullName

从包信息对象中获取包的完整名称。

<a id="syntaxSection" />

## 语法

```cpp theme={null}
HRESULT XtfGetPackageFullName(
         XtfPackageInfo packageInfo,
         PWSTR packageFullName,
         UINT32 *packageFullNameBufferLength
)  
```

<a id="parametersSection" />

### 参数

*packageInfo*\
类型：XtfPackageInfo

\[in] 指向包信息对象的指针。

*packageFullName*\
类型：PWSTR

\[out, optional] 包的完整名称。

*packageFullNameBufferLength*\
类型：UINT32 \*

\[in, out] 为 `packageFullName` 分配的长度，以 `WCHAR` 为单位。

### 返回值

类型：HRESULT

成功时返回 `S_OK`。如果 `packageFullName` 空间不够，此函数将返回 `HRESULT_FROM_WIN32(ERROR_MORE_DATA)`，并在 `packageFullNameBufferLength` 中返回所需的缓冲区长度。

<a id="remarksSection" />

## 备注

使用此函数从已注册包的信息对象中获取包的完整名称。通过调用 [XtfRegisterPackage](/reference/tools/xtf/xtfapi/functions/xtfregisterpackage-xtfapi-xbox-windows-m) 或 [XtfRegisterNetworkSharePackage](/reference/tools/xtf/xtfapi/functions/xtfregisternetworksharepackage-xtfapi-xbox-windows-m) 函数注册包时，会返回指向包信息对象的指针。

你还可以使用 [XtfGetCountofAppUserModelIds](/reference/tools/xtf/xtfapi/functions/xtfgetcountofappusermodelids-xtfapi-xbox-windows-m) 和 [XtfGetAumid](/reference/tools/xtf/xtfapi/functions/xtfgetaumid-xtfapi-xbox-windows-m) 函数来检索已注册包的应用程序用户模型 ID (AUMID)。有关包的更多信息，请参阅 [打包](/build/core-features/common/packaging/gc-packaging-toc)。

在 [IXtfApplicationClient](/reference/tools/xtf/xtfapplication/classes/IXtfApplicationClient/ixtfapplicationclient-xtfapplication-xbox-microsoft-t) 接口中的平台生命周期管理操作中会使用包的完整名称。

## 要求

**头文件：** xtfapi.h

**库：** XtfApi.lib

**支持的平台：** Windows（用于 XBOX 主机工具）

<a id="seealsoSection" />

## 另请参阅

[XTF 传输错误 (NDA 主题)](/tools/tools-console/commandlinetools/xtf-transport-errors)\
[XtfRegisterPackage](/reference/tools/xtf/xtfapi/functions/xtfregisterpackage-xtfapi-xbox-windows-m)\
[XtfRegisterNetworkSharePackage](/reference/tools/xtf/xtfapi/functions/xtfregisternetworksharepackage-xtfapi-xbox-windows-m)\
[其他 Xtf API](/reference/tools/xtf/xtfapi/atoc-xtfapi)


## Related topics

- [XtfGetTitleOSState](/zh-CN/reference/tools/xtf/xtfapi/functions/xtfgettitleosstate-xtfapi-xbox-windows-m.md)
- [XtfRegisterNetworkSharePackage](/zh-CN/reference/tools/xtf/xtfapi/functions/xtfregisternetworksharepackage-xtfapi-xbox-windows-m.md)
- [XtfGetTitleOSFourPartVersion](/zh-CN/reference/tools/xtf/xtfapi/functions/xtfgettitleosfourpartversion-xtfapi-xbox-windows-m.md)
- [XtfRegisterPackage](/zh-CN/reference/tools/xtf/xtfapi/functions/xtfregisterpackage-xtfapi-xbox-windows-m.md)
- [XtfRegisterPackageOnDrive](/zh-CN/reference/tools/xtf/xtfapi/functions/xtfregisterpackageondrive-xtfapi-xbox-windows-m.md)
