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

# XPackageFeatureEnumerationCallback

> XPackageFeatureEnumerationCallback

# XPackageFeatureEnumerationCallback

由 [XPackageEnumerateFeatures](https://docs.xbox.com/zh-CN/reference/system/xpackage/functions/xpackageenumeratefeatures.md) 用于枚举每个功能的回调。

## 语法

```cpp theme={null}
bool XPackageFeatureEnumerationCallback(  
         void* context,  
         const XPackageFeature* feature  
)  
```

### 参数

*context*   \_In\_\
类型：void\*

在启动功能枚举时传递给 [XPackageEnumerateFeatures](https://docs.xbox.com/zh-CN/reference/system/xpackage/functions/xpackageenumeratefeatures.md) 的上下文。

*feature*   \_In\_\
类型：[XPackageFeature\*](https://docs.xbox.com/zh-CN/reference/system/xpackage/structs/xpackagefeature.md)

指向描述功能的 [XPackageFeature](https://docs.xbox.com/zh-CN/reference/system/xpackage/structs/xpackagefeature.md) 结构的指针。

### 返回值

类型：bool

返回 true 以继续枚举程序包，返回 false 以停止枚举。

## 备注

此回调函数枚举程序包的 layout.xml 中定义的功能。程序包布局文件中定义的一个重要功能是 `displayName`。`displayName` 显示在游戏的 *Shell* 管理页中。有关 XBOX One 游戏所使用的打包技术的信息，请参阅[打包概述](https://docs.xbox.com/zh-CN/build/core-features/common/packaging/overviews/packaging.md)。

## 要求

**头文件：** XPackage.h

**支持的平台：** Windows、XBOX One 系列主机和 XBOX Series 主机

## 另请参阅

[XPackageEnumerateFeatures](https://docs.xbox.com/zh-CN/reference/system/xpackage/functions/xpackageenumeratefeatures.md)\
[XPackageFeature](https://docs.xbox.com/zh-CN/reference/system/xpackage/structs/xpackagefeature.md)\
[XPackage](https://docs.xbox.com/zh-CN/reference/system/xpackage/xpackage_members.md)


## Related topics

- [XPackageEnumerateFeatures](https://docs.xbox.com/zh-CN/reference/system/xpackage/functions/xpackageenumeratefeatures.md)
- [XPackage（API 内容）](https://docs.xbox.com/zh-CN/reference/system/xpackage/xpackage_members.md)
- [XPackageEnumerationCallback](https://docs.xbox.com/zh-CN/reference/system/xpackage/functions/xpackageenumerationcallback.md)
- [XPackageEnumeratePackages](https://docs.xbox.com/zh-CN/reference/system/xpackage/functions/xpackageenumeratepackages.md)
- [XPackageMountWithUiAsync](https://docs.xbox.com/zh-CN/reference/system/xpackage/functions/xpackagemountwithuiasync.md)
