Using the basic I/O services is similar to using the C run-time file I/O services. Files must be opened before they can be read or written. After reading or writing, the file must be closed. You can change the current read/write location by seeking to a specified position in an open file. The following table lists the basic file I/O functions:
Function | Description |
mmioClose | Closes an open file. |
mmioOpen | Opens a file for reading and/or writing, and returns a handle to the open file. |
mmioRead | Reads a specified number of bytes from an open file. |
mmioSeek | Changes the current position for reading and/or writing in an open file. |
mmioWrite | Writes a specified number of bytes to an open file. |
These file I/O functions provide the core of the multimedia file I/O services— you can use them for buffered and unbuffered I/O, as well as for I/O to RIFF files, memory files, and custom storage systems.