WriteFile Function

Writes binary data to a file.

bool WriteFile(Handle hndl, const int[] items, int num_items, int size)

Parameters

Handle hndl

Handle to the file.

const int[] items

Array of items to write. The data is read directly. That is, in 1 or 2-byte mode, the lower byte(s) in each cell are used directly, rather than performing any casts from a 4-byte number to a smaller number.

int num_items

Number of items in the array.

int size

Size of each item in the array in bytes. Valid sizes are 1, 2, or 4.

Return Value

True on success, false on error.

Errors

Invalid Handle.