05-25-2017 08:45 PM
Hello, everyone,
I was trying to queries a specified MIDI output device to determine its capabilities.
I read about the WinAPI (Winmm.dll), and found a function, midiOutGetDevCaps.
https://msdn.microsoft.com/en-us/library/windows/desktop/dd798469(v=vs.85).aspx
MMRESULT midiOutGetDevCaps(
UINT_PTR uDeviceID,
LPMIDIOUTCAPS lpMidiOutCaps,
UINT cbMidiOutCaps
);
I didn't know how to implement it, anyone have any idea?
Sort
05-26-2017 05:20 AM
You can use Call Library Function node in your program and call that particular dll and assign all the parameters as per the definition. Do a quick start and let us know if you get any error message. We will take it from there.
Mathan
05-26-2017 08:47 AM
Hi, Mathan,
Thank you for your reply.
I use Call Library Function and call a function, midiOutGetNumDevs. It works, I can get a number of MIDI output devices present in my computer.
When I try to call midiOutGetDevCaps function to query a specified MIDI output device to determine its capabilities. I don't know how to give parameters of midiOutGetDevCaps function. Could your teach me how to give parameters for this function. Thank you.
The Syntax of C++ shows following,
MMRESULT midiOutGetDevCaps( UINT_PTR uDeviceID, LPMIDIOUTCAPS lpMidiOutCaps, UINT cbMidiOutCaps );
Identifier of the MIDI output device. The device identifier specified by this parameter varies from zero to one less than the number of devices present. The MIDI_MAPPER constant is also a valid device identifier.
This parameter can also be a properly cast device handle.
Pointer to a MIDIOUTCAPS structure. This structure is filled with information about the capabilities of the device.
Size, in bytes, of the MIDIOUTCAPS structure. Only cbMidiOutCaps bytes (or less) of information is copied to the location pointed to by lpMidiOutCaps. If cbMidiOutCaps is zero, nothing is copied, and the function returns MMSYSERR_NOERROR.