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

#### 函数定义

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

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


#### 参数

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


#### 返回值

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