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

# XtfGetCountofAppUserModelIds

> XtfGetCountofAppUserModelIds

# XtfGetCountofAppUserModelIds

从包信息对象中获取应用程序用户模型 ID (AUMID) 的数量。

<a id="syntaxSection" />

## 语法

```cpp theme={null}
HRESULT XtfGetCountofAppUserModelIds(
         XtfPackageInfo packageInfo,
         UINT32 *countOfAUMIDs
)  
```

<a id="parametersSection" />

### 参数

*packageInfo*\
类型：XtfPackageInfo

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

*countOfAUMIDs*\
类型：UINT32 \*

\[out] 包中 AUMID 的数量。

<a id="retvalSection" />

### 返回值

类型：HRESULT

成功时返回 `S_OK`；否则返回一个错误代码。

<a id="remarksSection" />

## 备注

在调用 [XtfGetAumid](/reference/tools/xtf/xtfapi/functions/xtfgetaumid-xtfapi-xbox-windows-m) 函数以获取包中特定索引处的 AUMID 之前，使用此函数从已注册包的信息对象中获取可用的 AUMID 数量。通过调用 [XtfRegisterPackage](/reference/tools/xtf/xtfapi/functions/xtfregisterpackage-xtfapi-xbox-windows-m) 或 [XtfRegisterNetworkSharePackage](/reference/tools/xtf/xtfapi/functions/xtfregisternetworksharepackage-xtfapi-xbox-windows-m) 函数注册包时，会返回指向包信息对象的指针。

你还可以使用 [XtfGetPackageFullName](/reference/tools/xtf/xtfapi/functions/xtfgetpackagefullname-xtfapi-xbox-windows-m) 函数检索已注册包的完整名称。有关包的更多信息，请参阅 [打包](/build/core-features/common/packaging/gc-packaging-toc)。

## 要求

**头文件：** 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

- [XtfRegisterNetworkSharePackage](/zh-CN/reference/tools/xtf/xtfapi/functions/xtfregisternetworksharepackage-xtfapi-xbox-windows-m.md)
- [XtfGetPackageFullName](/zh-CN/reference/tools/xtf/xtfapi/functions/xtfgetpackagefullname-xtfapi-xbox-windows-m.md)
- [XtfRegisterPackageOnDrive](/zh-CN/reference/tools/xtf/xtfapi/functions/xtfregisterpackageondrive-xtfapi-xbox-windows-m.md)
- [XtfRegisterPackage](/zh-CN/reference/tools/xtf/xtfapi/functions/xtfregisterpackage-xtfapi-xbox-windows-m.md)
- [XtfGetAumid](/zh-CN/reference/tools/xtf/xtfapi/functions/xtfgetaumid-xtfapi-xbox-windows-m.md)
