I/O Procedure Entry Point

The following example illustrates the the entry point used to access the functionality of an I/O procedure.

LONG APIENTRY IOProc_Entry ( PVOID   pmmioStr,
                             USHORT  usMessage,
                             LONG    lParam1,
                             LONG    lParam2)

Associated parameters include the following.

┌───────────────┬─────────────────────────────────────────────┐
│Parameter      │Description                                  │
├───────────────┼─────────────────────────────────────────────┤
│PVOID pmmioStr │Specifies a pointer to an MMIOINFO data      │
│               │structure that contains information about the│
│               │open file.                                   │
├───────────────┼─────────────────────────────────────────────┤
│USHORT usMsg   │Specifies the message that the file I/O      │
│               │procedure is being asked to process.         │
│               │(User-defined messages must have messages    │
│               │defined above MMIOM_USER.)                   │
├───────────────┼─────────────────────────────────────────────┤
│LONG lParam1   │Specifies message-dependent information such │
│               │as a file name.                              │
├───────────────┼─────────────────────────────────────────────┤
│LONG lParam2   │Specifies additional message-dependent       │
│               │information.  (Used with some messages as    │
│               │values.)                                     │
└───────────────┴─────────────────────────────────────────────┘

Note: The return value is message-dependent. If the I/O procedure does not recognize a message passed in by usMsg, and the default message handler does not recognize usMsg, then it must return MMIOERR_UNSUPPORTED_MESSAGE.