Home | Sign in | English EN
This content has been translated automatically. Click here to view the French version.
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Stored procedures
MCIOpen (Function)
In french: MCIOuvre
Opens a multimedia file.
// Ouverture du fichier "C:\MesFichiers\Fichier.AVI"
// dans le champ Image "ImageAVI"
ResExécuteMCI = MCIOpen("C:\MesFichiers\Fichier.AVI")
// Lancer une vidéo "C:\MesFichiers\Fichier.AVI" en mode répétition
// Ouverture de la vidéo
MCIOpen("C:\MesFichiers\Fichier.AVI", "AVI", MciStyleChild, IMG_Vidéo, MciModeNormal)
// Exécution de la vidéo
MCIExécute("Play AVI repeat")
<Result> = MCIOpen(<Multimedia file> [, <Alias name> [, <Type of container object> [, <Container window> [, <Display mode> [, <Parameters> [, <Name of message window>]]]]]])
<Result>: Boolean
  • True if the file was opened,
  • False otherwise. To find out the error number, use function MCIErr.
    To get the details of the error, use MCIMsgErr or ErrorInfo with the errMessage constant.
    The report of the order can be known with the function MCIRetrieve.
<Multimedia file>: String or constant
Name of multimedia file to open (AVI, MP3, ...) or type of device to open:
MciAudioCDInitializes the audio CD
MciDigitalVideoInitializes the digital video player
MciVideoDiscInitializes the video player
MciSequencerInitialize the MDI mixing table
MciWaveAudioInitializes the .WAV reader
Remark: all the formats supported by the system are supported (which means the CODEC installed on the computer).
<Alias name>: Optional character string
Name used to handle the multimedia file. This name can be used in all the MCI functions.
<Type of container object>: Optional character string
Type of the window or control (child window, popup, ...) in which the multimedia file will be displayed.
MciStyleOverlappedStandard window
MciStylePopupWindow displayed in popup mode
MciStyleChildChild window of the current window
<Container window>: Optional integer or character string
Name or handle of the window or control where the file will be displayed.
Remark: The handle is returned by Handle.
<Display mode>: Optional constant
Mode for displaying the file in the window:
MciModeCenteredImage centered in the window
MciModeStretchedImage stretched to occupy the entire surface
(Default value)
Image proportionally stretched
MciModeNormalDisplay at 100%
<Parameters>: Optional character string
Additional parameters if necessary. These parameters can be known by checking the documentation of the Windows MCI function named "Open".
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 message window>: Optional character string
Name of window used to intercept and manage the different messages sent by MMSYSTEM.DLL. These messages are of type MM_xxxxxx and can be retrieved using function Event. You can for example get messages regarding the management of the CD ROM or Joystick.
Component: wd270std.dll
See also
Minimum version required
  • Version 9
This page is also available for…
Click [Add] to post a comment