...die Namen aller MIDI-Out Geräten ermitteln?
Autor: Ulli Conrad
procedure GetMIDIOutDevices(Devices: TStrings);
var
i, DNum: Integer;
Caps: TMIDIOUTCAPSA;
begin
DNum := MIDIOutGetNumDevs; // Number of Devices
for i := 0 to DNum - 1 do // Query Devicenames
begin
MIDIOutGetDevCaps(i, @Caps, SizeOf(TMIDIOutCapsA));
Devices.Add(string(Caps.szPname));
end;
end;
// Usage:
var
MIDIDevices: TStringList;
begin
MIDIDevices := TStringList.Create;
try
GetMIDIOutDevices(MIDIDevices);
// Do anything with the device name list
finally
MIDIDevices.Free;
end;
end;
printed from
www.swissdelphicenter.ch
developers knowledge base