Windows Multimedia DDK (mddkqh.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
MIDM_PREPARE
                                                 Contents Index Back
────────────────────────────────────────────────────────────────────────────
MIDM_PREPARE
 
        This message is sent to a MIDI input device driver to request
        the driver to prepare a system-exclusive data buffer for input.
         If data buffers are accessed at interrupt time, they must be
        page locked to ensure that the memory is not swapped out to
        disk.
 
Parameters
        DWORD dwParam1
            Specifies a far pointer to MIDIHDR structure identifying
            the data block.
 
        DWORD dwParam2
            Specifies the size of the MIDIHDR structure.
 
Return value
        The return value is an error code, or zero (MMSYSERR_NOERROR) if
        the operation is successful. Possible error codes are:
 
        MMSYSERR_NOTENABLED
            The driver failed to load or initialize.
 
        MMSYSERR_NOTSUPPORTED
            The driver does not support this message.
 
Comments
        Driver support for this message is optional. If a driver
        supports this message, then it must also support MODM_UNPREPARE.
 
        The default response for this message is to do nothing but
        return MMSYSERR_NOTSUPPORTED. In this case, MMSYSTEM will page
        lock the memory for the driver. If a driver requires other
        operations to prepare a data buffer for input, it should set the
        MHDR_PREPARED bit in the dwFlags field of the MIDIHDR structure
        and return MMSYSERR_NOERROR. In this case, MMSYSTEM assumes the
        driver has prepared the data buffer and does not page lock the
        memory. If a data buffer has already been prepared,
        MMSYSERR_NOERROR should be returned.
 
See also
        MIDM_UNPREPARE
 
                                       -♦-