Skip to content

Latest commit

 

History

History
58 lines (41 loc) · 1.7 KB

mciSendString.md

File metadata and controls

58 lines (41 loc) · 1.7 KB

Home

Function name : mciSendString

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.


Code examples:

Accessing a CD device (cdaudio) with Multimedia Command Strings
Using Multimedia Command Strings to play MIDI files

Declaration:

MCIERROR mciSendString(
  LPCTSTR lpszCommand,
  LPTSTR lpszReturnString,
  UINT cchReturn,
  HANDLE hwndCallback
);  

FoxPro declaration:

DECLARE INTEGER mciSendString IN winmm;
	STRING    lpszCommand,;
	STRING  @ lpszReturnString,;
	INTEGER   cchReturn,;
	INTEGER   hwndCallback
  

Parameters:

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.


Return value:

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.