Custom
Services
Multimedia
file I/O services use I/O procedures to handle the physical input and output
associated with reading and writing to different types of storage systems, such
as file-archival systems and database-storage systems. Predefined I/O
procedures exist for the standard file systems and for memory files, but you can
supply a custom I/O procedure for accessing a unique storage system by using
the mmioInstallIOProc
To open a
file by using a custom I/O procedure, use the mmioOpen
mmioOpen("filename.arc+element", NULL,
MMIO_READ);
When the file
I/O manager encounters a plus sign in a filename, it examines the filename
extension to determine which I/O procedure to associate with the file. In the
previous example, the file I/O manager would attempt to use the I/O procedure
associated with the .ARC filename extension; this I/O procedure would have been
installed by using mmioInstallIOProc
I/O
procedures must respond to the following messages:
MMIOM_CLOSE
MMIOM_OPEN
MMIOM_READ
MMIOM_WRITE
MMIOM_SEEK
MMIOM_RENAME
MMIOM_WRITEFLUSH
You can also
create custom messages and send them to your I/O procedure by using the mmioSendMessage
In addition
to processing messages, an I/O procedure must maintain the lDiskOffset
member of the MMIOINFO