---
title: BioWriteHook
description: "劫持写接口。"
url: https://www.hikunpeng.com/document/detail/zh/boostsds/BoostIO/kunpengboostIO_022.html
sourcePath: /source/zh/boostsds/BoostIO/kunpengboostIO_022.html
indexId: 55471d89bafb4665af4adcadafc570c46a50a1d427361011cb68743fe6aecac751
---
# BioWriteHook

#### 函数定义

劫持写接口。


#### 实现方法

int BioWriteHook(uint64_t inode, char *buff, uint64_t count, uint64_t offset, uint64_t fh)


#### 参数说明


**表1 参数说明**

| 参数名 | 数据类型 | 参数类型 | 描述 |
| --- | --- | --- | --- |
| inode | uint64\_t | 入参 | 文件inode。 |
| buff | char\* | 入参 | 待写入的数据。 |
| count | uint64\_t | 入参 | 待写入数据的长度。 |
| offset | uint64\_t | 入参 | 待写入数据的偏移。 |
| fh | uint64\_t | 入参 | 文件描述符。 |


#### 返回值


**表2 返回值说明**

| 返回值 | 描述 |
| --- | --- |
| 0 | 操作成功。 |
| 非0 | 操作失败。 |
