Group: Windows Multimedia - Library: winmm
The mciSendString function sends a command string to an MCI device. The device that the command is sent to is specified in the command string.
Accessing a CD device (cdaudio) with Multimedia Command Strings
Using Multimedia Command Strings to play MIDI files
MCIERROR mciSendString(
LPCTSTR lpszCommand,
LPTSTR lpszReturnString,
UINT cchReturn,
HANDLE hwndCallback
);
DECLARE INTEGER mciSendString IN winmm;
STRING lpszCommand,;
STRING @ lpszReturnString,;
INTEGER cchReturn,;
INTEGER hwndCallback
lpszCommand Pointer to a null-terminated string that specifies an MCI command string. For a list, see Multimedia Command Strings.
lpszReturnString Pointer to a buffer that receives return information. If no return information is needed, this parameter can be NULL.
cchReturn Size, in characters, of the return buffer specified by the lpszReturnString parameter.
hwndCallback Handle to a callback window if the "notify" flag was specified in the command string.
Returns zero if successful or an error otherwise. To retrieve a text description of mciSendString return values, pass the return value to the mciGetErrorString function.