For a memory file (MEM) that cannot expand, mmioWrite returns the number of bytes written. This might be fewer than requested if the end of file (EOF) was encountered prematurely. If the logical file pointer was past the EOF when the write operation was initiated, MMIO_ERROR is returned. If a pointer is at the EOF, a 0 is returned indicating no bytes were written. If the file can expand, it will do so and write the number of bytes requested, even if the logical file pointer was past the EOF when the write operation was initiated.
Note: User buffers cannot be expanded, but system-allocated buffers can be expanded.
Elements of a compound file will behave similar to the way a memory file does. The key to whether an element can be expanded is if the element is opened with the MMIO_APPEND flag set.
If the MMIO_TRANSLATEDATA flag was sent when the file was opened, the data is expected in the standard presentation format for the specific media type. The I/O procedure will translate the data from the standard presentation format into the I/O procedure format-specific representation before writing to the file. With images, for example, the standard data presentation format in uncompressed OS/2 2.0 bit-map data. For audio, the standard representation is uncompressed PCM data. The data will conform to the definition found in the media header supplied by mmioSetHeader.