nw::io::IOStream::Write Member Function

Syntax

virtual s32 Write(
     const void * buf,
     u32 length
);

Arguments

Name Description
in buf Pointer to the buffer where data to be written is stored. The alignment of this data must match the alignment obtained using the GetBufferAlign function.
in length Data size to be written. The alignment of this data must match the alignment obtained using the GetSizeAlign function.

Return Values

Returns the number of bytes actually written if data is written successfully.

Returns a negative error code if an error occurs during writing.
For details about the error codes that are returned, refer to the description of the concrete class.

Description

Writes data to the stream (synchronous process).

Fails on ASSERT if the return value of the nw::io::IOStream::CanWrite function is false.
This function blocks processing until the reading out of data has completed. You can use the asynchronous version of the function (nw::io::IOStream::WriteAsync) if the return value of the nw::io::IOStream::CanAsync function is true.

See Also

nw::io::IOStream::WriteAsync
nw::io::IOStream::CanWrite
nw::io::IOStream::CanAsync
nw::io::IOStream::GetBufferAlign
nw::io::IOStream::GetSizeAlign

Revision History

2009/10/20
Initial version.

CONFIDENTIAL