Add a new slot to a driver. MidiShare applications owning a "context alarm" will be informed of the new slot with the MIDIAddSlot alarm code.
SlotRefNum MidiAddSlot (short drvRefNum, SlotName name, SlotDirection direction);
drvRefNum
- the MidiShare reference number of the owner driver.
name
- the slot name.
direction
- the slot direction which may be in MidiInputSlot, MidiOutputSlot or MidiInputOutputSlot
The result is a 32-bit integer, a MidiShare unique slot reference number.
A SlotRefNum is composed of the driver reference number associated to a unique number in the driver context. Its structure is defined as:
typedef struct { short drvRef; short slotRef; } SlotRefNum;A macro defined as:
#define Slot(ref) (((ref).slotRef)gives the slot reference number.
This part is the base of the Driver Manager events dispatching : events sent to MidiShare by a driver or given to a driver by MidiShare should always carry their slot reference number in their port field.