PlayMMedia
InstallShield 2008 ยป InstallScript Language Reference
The PlayMMedia function plays a sound or AVI file. Sound files of type MIDI or WAVE and AVI (video) files can be played either in synchronous mode or in asynchronous mode. This function can also be used to play a file continuously. To do so, a flag can be bitwise ORed, which indicates that the file is to be run in continuous mode.
Note
Because AVI files are already tightly compressed and are often larger than 1.4 MB diskettes, video presentations are recommended only for CD-ROM setups.
Syntax
PlayMMedia (nType, szFileName, nOperation, nReserved);
Parameters
PlayMMedia Parameters
|
Parameter
|
Description
|
|
nType
|
Specifies the file type. Pass one of the following predefined constants in this parameter:
- MMEDIA_WAVEThe file is of WAVE sound format.
- MMEDIA_MIDIThe file is of MIDI sound format.
- MMEDIA_AVIThe file is an AVI file.
|
|
szFileName
|
Specifies the fully qualified name of the sound/AVI file to be played.
|
|
nOperation
|
Indicates the play mode. Pass the following predefined constants in this parameter:
- MMEDIA_PLAYSYNCHPlay synchronously.
- MMEDIA_PLAYASYNCHPlay asynchronously. This constant can be combined with MMEDIA_PLAYCONTINUOUS by using the OR (|) operator.
- MMEDIA_PLAYCONTINUOUSPlay in a continuous loop. This value cannot be used when playing a sound/AVI file in synchronous mode. It can be used only with files being played in asynchronous mode. Combine it with MMEDIA_PLAYASYNCH by using the OR (|) operator.
- MMEDIA_STOPStop playing.
|
|
nReserved
|
Pass zero in this parameter. No other value is allowed.
|
Return Values
PlayMMedia Return Values
|
Return Value
|
Description
|
|
0
|
Indicates that the function successfully played the file.
|
|
< 0
|
Indicates that the function was unable to play the file.
|
See Also
PlayMMedia Example