The following code illustrates how to install an IOProc.
FOURCC fourcc1 ; PMMIOPROC pIOProc1; ULONG ulFlags; .... fourcc1= FOURCC_WAVE; ulFlags= MMIO_FINDPROC; pIOProc1= mmioInstallIOProc (fourcc1, pIOProc1, ulFlags); if (!pIOProc1) /* WAVE I/O Procedure NOT FOUND */ else /* WAVE I/O Procedure FOUND */ ....
The following is a procedure prototype for a standard I/O procedure call.
LONG APIENTRY MMIOPROC (PVOID pmmioinfo, USHORT usMsg, LONG lParam1, LONG lParam2);
The following code illustrates how to call a custom I/O procedure and what parameters are required.
(LONG) lrc= IOProc(pmmioinfo, usMsg, lParam1, lParam2);
The I/O procedure must return MMIOERR_UNSUPPORTED_MESSAGE if it or subsequent I/O procedures it has called through mmioSendMessage does not understand usMsg.