---
title: KVMLGetVersion
description: "获取VML产品版本信息。"
url: https://www.hikunpeng.com/document/detail/zh/kunpenghpcs/hpckit/devg/kunpengaccel_kml_0138.html
sourcePath: /source/zh/kunpenghpcs/hpckit/devg/kunpengaccel_kml_0138.html
indexId: 9c180d1b4dce5bad5b0c825ccfb5ac72e23099476cf5fb6c7c9424890457bbd261
---
# KVMLGetVersion

获取VML产品版本信息。

#### 接口定义

int KVMLGetVersion(KVMLVersion *ver)


#### 参数

| 参数名 | 描述 | 取值范围 | 输入/输出 |
| --- | --- | --- | --- |
| ver | 产品信息结构体。 | 非空 | 输出 |


#### 返回值

- 成功：返回1。
- 失败：返回0。


#### 示例

```
#include <stdio.h>
#include "kvml.h"

int main()
{
    KVMLVersion vmlver;
    int status = KVMLGetVersion(&vmlver);
    if (status == 0) {
        return 0;
    }
    printf("Product Name: %s\n", vmlver.productName);
    printf("Product Version: %s\n", vmlver.productVersion);
    printf("Component Name: %s\n", vmlver.componentName);
    printf("Component Version: %s\n", vmlver.componentVersion);
    printf("Component AppendInfo: %s\n", vmlver.componentAppendInfo);
    printf("Software Name: %s\n", vmlver.softwareName);
    printf("Software Version: %s\n", vmlver.softwareVersion);
    return 0;
}
```

运行结果：

```
Product Name: Kunpeng HPCKit
Product Version: 24.0.RC1
Component Name: HPCKit-kml
Component Version: 2.3.0
Component AppendInfo: gcc
Software Name: hpckit-kml-vml
Software Version: 2.3.0
```

以上版本号和编译时间以实际运行结果为准，上述结果仅供参考。
