MMIOINFO

This structure contains the current state of a file opened with mmioOpen.

typedef struct _MMIOINFO {
    DWORD  dwFlags;
    FOURCC  fccIOProc;
    LPMMIOPROC  pIOProc;
    WORD  wErrorRet;
    WORD  wReserved;
    LONG  cchBuffer;
    HPSTR  pchBuffer;
    HPSTR  pchNext;
    HPSTR  pchEndRead;
    HPSTR  pchEndWrite;
    LONG  lBufOffset;
    LONG  lDiskOffset;
    DWORD  adwInfo[4];
    DWORD  dwReserved1;
    DWORD  dwReserved2;
    HMMIO  hmmio;
} MMIOINFO;

Fields

The MMIOINFO structure has the following fields:

dwFlags

Specifies options indicating how a file was opened:

MMIO_READ

The file was opened only for reading.

MMIO_WRITE

The file was opened only for writing.

MMIO_READWRITE

The file was opened for both reading and writing.

MMIO_COMPAT

The file was opened with compatibility mode, allowing any process on a given machine to open the file any number of times.

MMIO_EXCLUSIVE

The file was opened with exclusive mode, denying other processes both read and write access to the file.

MMIO_DENYWRITE

Other processes are denied write access to the file.

MMIO_DENYREAD

Other processes are denied read access to the file.

MMIO_DENYNONE

Other processes are not denied read or write access to the file.

MMIO_CREATE

mmioOpen was directed to create the file, or truncate it to zero length if it already existed.

MMIO_ALLOCBUF

The file's I/O buffer was allocated by mmioOpen or mmioSetBuffer.

fccIOProc

Specifies the four-character code identifying the file's I/O procedure. If the I/O procedure is not an installed I/O procedure, fccIOProc is NULL.

pIOProc

Specifies the address of the file's I/O procedure.

wErrorRet

Holds the extended error value from mmioOpen if mmioOpen returns NULL. Is not used to return extended error information from any other functions.

wReserved

Reserved for future use.

cchBuffer

Specifies the size of the file's I/O buffer in bytes. If the file does not have an I/O buffer, this field is zero.

pchBuffer

Specifies the address of the file's I/O buffer. If the file is unbuffered, pchBuffer is NULL.

pchNext

Specifies a huge pointer to the next location in the I/O buffer to be read or written. If no more bytes can be read without calling mmioAdvance or mmioRead, then this field points to pchEndRead. If no more bytes can be written without calling mmioAdvance or mmioWrite, then this field points to pchEndWrite.

pchEndRead

Specifies a pointer to the location that is one byte past the last location in the buffer that can be read.

pchEndWrite

Specifies a pointer to the location that is one byte past the last location in the buffer that can be written.

lBufOffset

Reserved for internal use by MMIO functions.

lDiskOffset

Specifies the current file position. The current file position is an offset in bytes from the beginning of the file. I/O procedures are responsible for maintaining this field.

adwInfo[4]

Contained state information maintained by the I/O procedure. I/O procedures can also use these fields to transfer information from the caller to the I/O procedure when the caller opens a file.

dwReserved1

Reserved for internal use by MMIO functions.

dwReserved2

Reserved for internal use by MMIO functions.

hmmio

Specifies the MMIO handle to the open file. I/O procedures can use this handle when calling other MMIO functions.

See Also

mmioGetInfo