For opening and closing of a Midi port. The implementation of Midi ports is controlled by the MidiSetPortState and MidiGetPortState routines. These must be used with care since they affect all the applications. A closed port is available for other uses (printing, AppleTalk, etc.). The Midi applications holding a "context alarm" will be informed of this change in the ports state.
pascal void MidiSetPortState( short port, Boolean state );
port
- a 16-bit integer, the port number to control.
state
- a Boolean, True : to open a port, False : to close a port.
Open port 0.
MidiSetPortState(0, 1);