---
title: 更改填充值模式
description: "更改填充值模式以提高写入性能。"
url: https://www.hikunpeng.com/document/detail/zh/hpchistory/hpckit/develop2400/userg_hyperio_0046.html
sourcePath: /source/zh/hpchistory/hpckit/develop2400/userg_hyperio_0046.html
indexId: 7c4adb34787b3e42660d7e6e42a48eab3bd5a6417194e1636f8890635fef9e5264
---
# 更改填充值模式

#### 函数定义

更改填充值模式以提高写入性能。


nc_set_fill(int ncid, int fillmode, int *old_modep)

#### 参数

| 参数名 | 描述 | 取值范围 | 输入/输出 |
| --- | --- | --- | --- |
| ncid | 文件ID | 非负整数 | 输入 |
| fillmode | 填充模式 | 0或0x100 | 输入 |
| \*old\_modep | 返回之前填充模式的指针 | 非空 | 输出 |


#### 返回值

- 成功：返回NC_NOERR。
- 失败：返回错误码。


#### 错误码

| 错误码 | 描述 |
| --- | --- |
| NC\_EBADID | 无效ncid |
| NC\_EINVAL | 无效参数 |
| NC\_ENOMEM | 内存不足 |
