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

# GetPackageVersionFromManifest

> GetPackageVersionFromManifest

# GetPackageVersionFromManifest

返回指定应用程序清单对应包的版本。

## 语法

```cpp theme={null}
HRESULT GetPackageVersionFromManifest(
         PCWSTR manifestPath,
         UINT64* packageVersion
)
```

### 参数

*manifestPath*   \_In\_\
类型：PCWSTR

清单的路径。

*packageVersion*   \_Out\_\
类型：UINT64\*

返回时，包含包的版本。

### 返回值

类型：HRESULT

成功时返回 `S_OK`。否则，返回错误代码。有关错误代码的列表，请参阅[错误代码](https://docs.xbox.com/zh-CN/reference/errorcodes.md)。

## 备注

要确定清单是否为 Microsoft 游戏开发工具包 (GDK) 清单，请调用 [GetIsGameCorePartition](https://docs.xbox.com/zh-CN/reference/tools/packagingservices/functions/getisgamecorepartition.md)。

要解析清单并验证架构，请调用 [ValidateSchemaForManifest](https://docs.xbox.com/zh-CN/reference/tools/packagingservices/functions/validateschemaformanifest.md)。

有关打包的更多信息，请参阅[打包概览](https://docs.xbox.com/zh-CN/build/core-features/common/packaging/overviews/packaging.md)。

## 要求

**头文件：** packagingservices.h

**库：** packagingservices.lib

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

## 另请参阅

[PackagingServices](https://docs.xbox.com/zh-CN/reference/tools/packagingservices/packagingservices_members.md)


## Related topics

- [PackagingServices（API 内容）](https://docs.xbox.com/zh-CN/reference/tools/packagingservices/packagingservices_members.md)
- [GetPackageFullNameFromManifest](https://docs.xbox.com/zh-CN/reference/tools/packagingservices/functions/getpackagefullnamefrommanifest.md)
- [GetPackageFamilyNameFromManifest](https://docs.xbox.com/zh-CN/reference/tools/packagingservices/functions/getpackagefamilynamefrommanifest.md)
- [GetPackageInfoFromGameConfig](https://docs.xbox.com/zh-CN/reference/tools/packagingservices/functions/getpackageinfofromgameconfig.md)
- [GetPackageFullNameFromInfo](https://docs.xbox.com/zh-CN/reference/tools/packagingservices/functions/getpackagefullnamefrominfo.md)
