MIDIAddLink

MIDIAddLink creates a link from the source instance (minstanceSource) to the target instance (minstanceTarget) on the specified slot (ulSlotNumber).

MIDIAddLink( minstanceSource, minstanceTarget, ulSlotNumber, ulFlag )

Parameters

 * MINSTANCE minstanceSource (input): The source instance number.
 * MINSTANCE minstanceTarget (input): The target instance number.
 * ULONG ulSlotNumber (input): The slot number of the source instance.
 * ULONG ulFlag (input): This parameter is not currently used and must be set to 0.

Returns

 * ULONG rc:The following values can be returned

Gotchas
A link is only allowed between two hardware nodes, a hardware node and an instance owned by this process, or between two instances which are owned by this process.

The value of the slot number (ulSlotNumber) depends on the class of the source instance. The class defines the number and meaning of the slots of its instances. Most classes only provide one slot, so ulSlotNumber will be 0 for these classes.

Sample Code
MINSTANCE miSource; MINSTANCE miTarget; ULONG ulSlot; /* Create a link from the instance identified with miSource      */ /* to the instance identified with miTarget, on the slot         */ /* of the source instance rc = MIDIAddLink(miSource, miTarget, ulSlot, 0); if (rc != 0) { 	 /* We got an error to take care of. */ 	}
 * 1) include 