---
title: 创建数据空间
description: "创建一个新的简单数据空间并打开它以进行访问。"
url: https://www.hikunpeng.com/document/detail/zh/hpchistory/hpckit/develop2400/userg_hyperio_0117.html
sourcePath: /source/zh/hpchistory/hpckit/develop2400/userg_hyperio_0117.html
indexId: 4ebd06916d94bc587ef3c1e15aaaa5515bb97ccc4207cd8b714c84f8a9bacbdc64
---
# 创建数据空间

#### 函数定义

创建一个新的简单数据空间并打开它以进行访问。

hid_t H5Screate_simple(int rank, const hsize_t dims[], const hsize_t maxDims[])


#### 参数

| 参数名 | 描述 | 取值范围 | 输入/输出 |
| --- | --- | --- | --- |
| rank | 数据空间的维度数。 | 整数 | 输入 |
| dims[] | 每个维度大小的数组。 | 非空 | 输入 |
| maxDims[] | 每个维度的最大大小的数组。 | 非空 | 输入 |


#### 返回值

- 成功：返回数据空间标识符。
- 失败：返回负值。
