write
An access method that writes to the data buffer.
Declaration
virtual IOReturn write(
void *srcBuffer,
UInt32 srcBufferSize,
UInt32 writeOffset = 0);Parameters
- srcBuffer:
Pointer to the source buffer.
- srcBufferSize:
The number of bytes to write to the data buffer.
- writeOffset:
An offset from the start of the destination data buffer to begin writing.
Return Value
Returns kIOReturnSuccess on success, kIOReturnBadArgument if any of the arguments provided is invalid, kIOReturnNotWritable if write access is not permitted, or an error from the notification handler.
Overview
This method handles an external request to write to the data buffer from a source buffer provided by the accessor. After checking that the data object supports write accesses, the data buffer is updated if it exists. Then the registered notification handler is called.