Message Handling
An IOProc is a message-based handler. Applications and the MMIO subsystem
communicate to IOProcs through the use of MMIO messages. When MMIO receives
a request from an application, the MMIO Manager sends a message for that
operation to the IOProc that is responsible for that particular file format
or storage system. In turn, the I/O procedure performs operations based
on the messages it receives from the MMIO Manager or an application.
MMIO messages can be either pre-defined or user-defined messages:
Pre-defined Message
This is a system message that
is sent by the MMIO Manager for its associated function. For example, an
application issuing an mmioOpen function causes the MMIO Manager to send
an MMIOM_OPEN message to an I/O procedure to open a specific file. These
messages enable applications to manage media files in a format-independent
manner. The MMIO Manager determines the correct I/O procedure to process
the message, based on an I/O procedure identifier and I/O procedure type
specified in the function. See I/O
Procedure Identifier (FOURCC) and I/O
Procedure Type.
User-defined Message
This
is a private message sent directly to an I/O procedure from an application
through the use of the mmioSendMessage function. This function enables
a program to call an I/O procedure directly (unlike system messages, which
are sent by the MMIO Manager). MMIOOS2.H in the \TOOLKIT\H subdirectory
defines the identifier MMIO_USER so that you can create your own messages.
The mmioSendMessage function requires that your custom messages be defined
at or above the MMIOM_USER value defined in the MMIOOS2.H file.
[Back: I/O Procedure Architecture]
[Next: I/O Procedure Identifier (FOURCC)]