Installing an I/O procedure in the MMIO I/O procedure table allows mmioOpen to call that procedure if the file name given to mmioOpen is specified as being a FOURCC of the same type specified in the fccIOProc parameter. For example, if you install a hypothetical I/O procedure with the fccIOProc parameter equal to XYZ, and then call mmioOpen to open the file FOO.XYZ, setting the fccIOProc field of MMIOINFO = XYZ, your I/O procedure is called to open and perform I/O on FOO.XYZ.

mmioInstallIOProc maintains a separate list of installed I/O procedures for each OS/2 application that uses MMIO services. If application X (or a DLL that application X calls) installs an I/O procedure identified as ABC, and application Y (or a DLL that Y calls) installs another I/O procedure identified as ABC, then MMIO services keeps separate entries in the I/O procedure table. Therefore, different applications can use the same I/O procedure identifier for different I/O procedures without conflict. Also, if an I/O procedure is implemented in a DLL and shared among several applications, each application must call mmioInstallIOProc individually (or get the DLL to call it for the application), once to install the I/O procedure, and once to remove it from the table.

If an application calls mmioInstallIOProc more than once to register the same I/O procedure, then mmioInstallIOProc must be called once with MMIO_REMOVEPROC for each time it is called with MMIO_INSTALLPROC.

mmioInstallIOProc will not prevent an application from installing two different I/O procedures with the same identifier, or installing an I/O procedure with the same identifier as a built-in I/O procedure (DOS, MEM, or BND). The most recently installed procedure takes precedence, and is the first one to get removed by MMIO_REMOVEPROC.


[Back] [Next]