MIDIHDR

The MIDIHDR structure defines the header used to identify a MIDI system-exclusive or stream buffer.

typedef struct midihdr_tag { 
    LPSTR      lpData; 
    DWORD      dwBufferLength; 
    DWORD      dwBytesRecorded; 
    DWORD_PTR  dwUser; 
    DWORD      dwFlags; 
    struct midihdr_tag * lpNext; 
    DWORD_PTR  reserved; 
    DWORD      dwOffset; 
    DWORD_PTR  dwReserved[4]; 
} MIDIHDR, *LPMIDIHDR; 
 

Members

lpData

Pointer to MIDI data.

dwBufferLength

Size of the buffer.

dwBytesRecorded

Actual amount of data in the buffer. This value should be less than or equal to the value given in the dwBufferLength member.

dwUser

Custom user data.

dwFlags

Flags giving information about the buffer.

MHDR_DONE

Set by the device driver to indicate that it is finished with the buffer and is returning it to the application.

MHDR_INQUEUE

Set by Windows to indicate that the buffer is queued for playback.

MHDR_ISSTRM

Set to indicate that the buffer is a stream buffer.

MHDR_PREPARED

Set by Windows to indicate that the buffer has been prepared by using the midiInPrepareHeader or midiOutPrepareHeader function.

lpNext

Reserved; do not use.

reserved

Reserved; do not use.

dwOffset

Offset into the buffer when a callback is performed. (This callback is generated because the MEVT_F_CALLBACK flag is set in the dwEvent member of the MIDIEVENT structure.) This offset enables an application to determine which event caused the callback.

dwReserved

Reserved; do not use.

Requirements

**  Windows NT/2000/XP:** Included in Windows NT 3.1 and later.
**  Windows 95/98/Me:** Included in Windows 95 and later.
**  Header:** Declared in Mmsystem.h; include Windows.h.

See Also

Musical Instrument Digital Interface (MIDI), MIDI Structures, MIDIEVENT, midiInPrepareHeader, midiOutPrepareHeader