---
title: writeBytes
framework: kernel
role: pseudoSymbol
path: kernel/iodmacommand/1811341-writebytes
---

# writeBytes

Copy data to the IODMACommand's buffer from the specified buffer.

## Declaration

```occ
UInt64 writeBytes(
 UInt64offset,
 const void *bytes,
 UInt64length); 
```

## Parameters

- `offset`: A byte offset into the IODMACommand's memory, relative to the prepared offset.
- `bytes`: The caller supplied buffer to copy the data from.
- `length`: The length of the data to copy.

## Return Value

Return Value The number of bytes copied, zero will be returned if the specified offset is beyond the prepared length of the IODMACommand.

## Overview

Overview This method copies data to the IODMACommand's memory at the given offset, from the caller's buffer. The IODMACommand must be prepared, and the offset is relative to the prepared offset.

## See Also

### Transferring Data

- [readBytes](kernel/iodmacommand/1811301-readbytes.md)
- [readBytes](kernel/iodmacommand/1547724-readbytes.md)
- [writeBytes](kernel/iodmacommand/1547742-writebytes.md)
