MIDIHDR structure

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

Syntax

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.

    Name Description
    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

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Mmsystem.h (include Windows.h)

See also

Musical Instrument Digital Interface (MIDI)

MIDI Structures

MIDIEVENT

midiInPrepareHeader

midiOutPrepareHeader

MIDI Structures