PreviousNext
Macrovision

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

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_WAVE—The file is of WAVE sound format.
  • MMEDIA_MIDI—The file is of MIDI sound format.
  • MMEDIA_AVI—The 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_PLAYSYNCH—Play synchronously.
  • MMEDIA_PLAYASYNCH—Play asynchronously. This constant can be combined with MMEDIA_PLAYCONTINUOUS by using the OR (|) operator.
  • MMEDIA_PLAYCONTINUOUS—Play 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_STOP—Stop 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




Copyright Information | Contact Macrovision