Returns the number of tracks found in a media file that was opened beforehand (MCIOpen
Info("Number of tracks: " + MCITrackCount("cd"))
<Result> = MCITrackCount(<Media file or alias> [, <Parameters> [, <Name of the message window>]])
<Result>: Character string
- Number of tracks,
- -1 if an error occurred. 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 use (AVI, MP3, ...).
- Alias defined when opening the file (MCIOpen).
<Parameters>: Optional character string
Additional parameters if necessary. These parameters can be known by checking the documentation of the Windows MCI function named "Status".
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.