MMIOProc  ZH8JEH

The MMIOProc function is a custom input/output (I/O) procedure installed by the mmioInstallIOProcJLOZ0C function. MMIOProc is a placeholder for the application-defined function name. The address of this function can be specified in the callback-address parameter of mmioInstallIOProc.

LRESULT MMIOProc(

    LPSTR lpmmioinfo,

 

    UINT uMsg,

 

    LONG lParam1,

 

    LONG lParam2

 

   );

 

 

Parameters

lpmmioinfo

Points to an MMIOINFO7F4X5_ structure containing information about the open file.

The I/O procedure must maintain the lDiskOffset member in this structure to indicate the file offset to the next read or write location. The I/O procedure can use the adwInfo[] member to store state information. The I/O procedure should not modify any other members of the MMIOINFO structure.

uMsg

Specifies a message indicating the requested I/O operation. Messages that can be received include MMIOM_OPEN4FIOPBE, MMIOM_CLOSEXY8MNC, MMIOM_READC_5H31, MMIOM_SEEKC_6H78, MMIOM_WRITE.92H83, and MMIOM_WRITEFLUSH73.INS.

lParam1

Specifies an application-defined parameter for the message.

lParam2

Specifies an application-defined parameter for the message.

 

Return Values

The return value depends on the message specified by uMsg. If the I/O procedure does not recognize a message, it should return zero.

Remarks

The four-character code specified by the fccMMIOProc member in the MMIOINFO7F4X5_ structure associated with a file identifies a filename extension for a custom storage system. When an application calls mmioOpen8DMA.3 with a filename such as  one.xyz+two , the I/O procedure associated with the four-character code  XYZ  is called to open the  two  element of the file  one.xyz .

The mmioInstallIOProcJLOZ0C function maintains a separate list of installed I/O procedures for each Windows-based application. Therefore, different applications can use the same I/O procedure identifier for different I/O procedures without conflict. However, installing an I/O procedure globally enables any process to use the procedure.

If an application calls mmioInstallIOProc more than once to register the same I/O procedure, then it must call mmioInstallIOProc to remove the procedure once for each time it installed the procedure.

mmioInstallIOProc will not prevent an application from installing two different I/O procedures with the same identifier, or installing an I/O procedure with one of the predefined identifiers ( DOS  ,  MEM  ). The most recently installed procedure takes precedence, and the most recently installed procedure is the first one to be removed.

When searching for a specified I/O procedure, local procedures are searched first, then global procedures.

See Also

MMIOINFO, mmioInstallIOProc, MMIOM_OPEN, MMIOM_CLOSE, MMIOM_READ, MMIOM_SEEK, MMIOM_WRITE, MMIOM_WRITEFLUSH, mmioOpen