The Multimedia file I/O manager uses the MMIOINFO data structure to maintain state information on an open file. The MMIOINFO data structure is defined in the MMSYSTEM.H header file as follows:
typedef struct _MMIOINFO
{
/* general fields */
DWORD dwFlags; // general status flags
FOURCC fccIOProc; // ptr. to I/O procedure
LPMMIOPROC pIOProc; // ptr. to I/O procedure
WORD wErrorRet; // location for error to be returned
WORD wReserved; // reserved for structure alignment
/* fields maintained by MMIO functions during buffered I/O */
LONG cchBuffer; // size of I/O buffer (or 0L)
HPSTR pchBuffer; // start of I/O buffer (or NULL)
HPSTR pchNext; // ptr. to next byte to read/write
HPSTR pchEndRead; // ptr. to last valid byte to read
HPSTR pchEndWrite; // ptr. to last available byte to write
LONG lBufOffset; // disk offset of start of buffer
/* fields maintained by I/O procedure */
LONG lDiskOffset; // disk offset of next read/write
DWORD adwInfo[3]; // data specific to MMIOPROC type
/* other fields maintained by MMIO */
DWORD dwReserved1; // reserved for internal use
DWORD dwReserved2; // reserved for internal use
HMMIO hmmio; // handle to open file
} MMIOINFO;
For more information and examples using the MMIOINFO structure, see “Directly Accessing a File I/O Buffer,” “Performing I/O on Memory Files,” and “Using Custom I/O Procedures,” all later in this chapter.