Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than winmm, prefix the name with the module name and a period.
Use (uint)Marshal.SizeOf(typeof(MIDIINCAPS)) for cbMidiInCaps.
Sample Code:
public void GetInputDevices()
{
uint inDevs = midiInGetNumDevs();
if (inDevs > 0)
uint outDevs = midiInGetNumDevs();
if (outDevs > 0)
{
for (int x = 0; x < inDevs; x++)
for (int x = 0; x < outDevs; x++)
{
MIDIINCAPS caps = new MIDIINCAPS();
midiInGetDevCaps((UIntPtr)x, ref caps, (uint)Marshal.SizeOf(typeof(MIDIINCAPS)));
//Do whatever you want with the caps object here
MessageBox.Show(caps.szPname);
}
return;
}
MessageBox.Show("No MIDI Input Devices Detected");
}
}
MIDIINCAPS stores driver capabilities and name returned from midiInGetDevCaps
7/5/2013 10:39:59 AM - -79.236.150.237
Enumeration for the MMRESULT possible values in winmm.dll
7/21/2010 3:53:56 PM - -65.122.179.242
Please edit this page!
Do you have...
helpful tips or sample code to share for using this API in managed code?
corrections to the existing content?
variations of the signature you want to share?
additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).