---
title: 读取属性
description: "读取属性。"
url: https://www.hikunpeng.com/document/detail/zh/hpchistory/hpckit/develop2400/userg_hyperio_0090.html
sourcePath: /source/zh/hpchistory/hpckit/develop2400/userg_hyperio_0090.html
indexId: 14df70901d2340678a0861b5fe9931be3928455d81abb8fd22c2e6810803ec9c64
---
# 读取属性

#### 函数定义

读取属性。

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


#### 参数

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


#### 返回值

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