ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Windows functions / MCI functions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
MCIPlay (Function)
In french: MCIJoue
Plays a media file. This file can be played even if it is not opened beforehand (MCIOpen).
Example
MCIOpen("Sound.wav", "MySound")
...
MCIPlay("MySound")
...
MCIClose("MySound")
Syntax
<Result> = MCIPlay(<Media file or alias> [, <Start Position> [, <End position> [, <Parameters> [, <Name of the message window>]]]])
<Result>: Boolean
  • True if the file was played,
  • False otherwise. To get the error number, use MCIErr.
    To get more details on the error, use MCIMsgErr or ErrorInfo with the errMessage constant.
    The status report of the command is returned by MCIRetrieve.
<Media file or alias>: Character string
Name of media file to play (AVI, MP3, ...) or alias defined when opening the file (MCIOpen).
<Start Position>: Optional character string
Position in the file to play. The file will be played from this position. This position must be expressed in the format specified by MCIPositionFormat.
<End position>: Optional character string
Final position in the file to play. The file will be played up to this position. This position must be expressed in the format specified by MCIPositionFormat.
<Parameters>: Optional character string
Additional parameters if necessary. These parameters can be known by checking the documentation of the Windows MCI function "Play".
The MciWait constant can be added to this string. This constant is used to indicate that the program must wait for the end of the MCI command to run the rest of application.
<Name of the message window>: Optional character string
Name of the window used to intercept and manage the different messages sent by MMSYSTEM.DLL. These messages are in MM_xxxxxx format and can be retrieved with Event. You can for example get messages regarding the management of the CD ROM or Joystick.
Component: wd290std.dll
See also
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help