MidiOpen

BOOL WINAPI MidiOpen
(
	LPSTR lpstrFile,
	DWORD dwDevice,
	LPHANDLE lphSequence
);

This function opens a MIDI file.

Parameters

Return values

TRUE if the sequence was open or FALSE if not. The possible reasons for an error are a bad file name, a busy midiOut device or an invalid pointer for the handle.

Remarks

Call MidiClose to close the sequence and free the resources associated to it. Call MidiPlay to listen to the sequence.

Example

HANDLE Sequence;

// Open the sequence
MidiOpen("test1.mid", DEFAULT_DEVICE, &Sequence);

// Play it
MidiPlay(Sequence);

// Close it anyway
MidiClose(Sequence);

Further information

Released in November 19th, 2003
Updated in April 29th, 2004
Property of Breno de Lima Sarmento
Home page: http://www27.brinkster.com/brels
E-mail: breno_sarmento@hotmail.com
ICQ: 78977999 ()