Попробуйте преобразовать следующий найденный код здесь в VBA ...
typedef struct {
WORD wMid;
WORD wPid;
MMVERSION vDriverVersion;
TCHAR szPname[MAXPNAMELEN];
WORD wTechnology;
WORD wVoices;
WORD wNotes;
WORD wChannelMask;
DWORD dwSupport;
} MIDIOUTCAPS;
Я использовал это на VBA вместо
' MIDI output device capabilities structure
Public Structure MIDIOUTCAPS
Dim wMid As Short ' Manufacturer ID
Dim wPid As Short ' Product ID
Dim vDriverVersion As Integer ' Driver version
Dim szPname As String ' Product Name
Dim wTechnology As Short ' Device type
Dim wVoices As Short ' n. of voices (internal synth only)
Dim wNotes As Short ' max n. of notes (internal synth only)
Dim wChannelMask As Short ' n. of Midi channels (internal synth only)
Dim dwSupport As Integer ' Supported extra controllers (volume, etc)
EndStructure
Однако это дает ошибки повсюду! Кажется, публичная структура в VBA не принята!
Цель состоит в том, чтобы использовать эту структуру со следующей функцией:
Declare Function midiOutGetDevCaps Lib "winmm.dll" (ByVal uDeviceID As Integer, ByRef lpCaps As MIDIINCAPS, ByVal uSize As Integer) As Integer
Любая помощь о том, как получить описание устройства MIDI?
Спасибо