---
title: 读取属性
description: "读取属性。"
url: https://www.hikunpeng.com/document/detail/zh/kunpenghpcs/hpckit/devg/userg_hyperio_0090.html
sourcePath: /source/zh/kunpenghpcs/hpckit/devg/userg_hyperio_0090.html
indexId: ea13dff9bffdc4fc1500ca33af378846808a84b0e072274f3b68a8eb12a3f1d858
---
# 读取属性

#### 函数定义

读取属性。

herr_t H5Aread(hid_t attributeId, hid_t datatypeId, void *buffer )


#### 参数

| 参数名 | 描述 | 取值范围 | 输入/输出 |
| --- | --- | --- | --- |
| attributeId | 要读取的属性的标识符。 | 整数 | 输入 |
| datatypeId | 属性数据类型的标识符（在内存中）。 | 整数 | 输入 |
| \*buffer | 读取数据的缓冲区。 | 非空 | 输出 |


#### 返回值

- 成功：返回非负值。
- 失败：返回负值。
