in xojo a “Sub” is a method wihtout a return value, a “Function” is a method that does return a value.
So the “Sub” is the same as “void myFunc(){}” in c/c++
This function:
ItemCount MIDIGetNumberOfSources(void);
Does return a value of type “ItemCount” and has no parameters (void)
That means it’s the same as a Xojo “Function” since it has a return value.
Try this one, i don’t think you need a selector since i see no selector in the Objective-C docs.
Soft Declare Function MIDIGetNumberOfSources Lib "CoreMIDI" () As Integer