|
Verifying the Output Device
After opening the sequencer, you should check whether the MIDI mapper was
available and selected as the output device. The following example uses the MCI_STATUS command to verify that the MIDI mapper is the output device for the MCI
sequencer.
UINT wDeviceID; // valid MCI sequencer ID
DWORD dwReturn;
MCI_STATUS_PARMS mciStatusParms;
// Make sure the opened device is the MIDI mapper.
mciStatusParms.dwItem = MCI_SEQ_STATUS_PORT;
if (dwReturn = mciSendCommand(wDeviceID, MCI_STATUS, MCI_STATUS_ITEM,
(DWORD)(LPVOID) &mciStatusParms))
{
// Error sending MCI_STATUS command.
return;
}
if (LOWORD(mciStatusParms.dwReturn) == MIDI_MAPPER)
// The MIDI mapper is the output device.
Else
// The MIDI mapper is not the output device.
Related Links
Software for Delphi and C++ Builder developers
Software for Visual Studio .NET developers
Software for Visual Basic 6 developers
Delphi Tips&Tricks
MegaDetailed.NET
More Online Helps
Win32 Programmer's Reference (win32.hlp)
OLE Programmer's Reference (ole.hlp)
Microsoft Windows Pen API Programmer's Reference (penapi.hlp)
Microsoft Windows Sockets 2 Reference (sock2.hlp)
Microsoft Windows Telephony API (TAPI) Programmer's Reference (tapi.hlp)
Unix Manual Pages
|