MIDIHDR

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

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

Members

lpData
Address of 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.
midihdr_tag
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.

QuickInfo

  Windows NT: Requires version 3.1 or later.
  Windows: Requires Windows 95 or later.
  Windows CE: Unsupported.
  Header: Declared in mmsystem.h.

See Also

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