IBM Books

Image, Audio, and Video Extenders Administration and Programming

Specifying a wait indicator

You can specify whether you want your application program to wait for the user to end the display or play program before the application continues (that is, before the DBiBrowse, DBaPlay, or DBvPlay API returns a code). If you want your application program to wait, specify MMDB_PLAY_WAIT. If you do not want your application program to wait, specify MMDB_PLAY_NO_WAIT. MMDB_PLAY_WAIT and MMDB_PLAY_NO_WAIT are constants that are defined by the extenders.

If you specify MMDB_PLAY_WAIT, the display or play program will run in the same thread or process as your application program. If you specify MMDB_PLAY_NO_WAIT, the display or play program will run in its own thread or process independently of your application program.

For example, as a result of the following statement, the application program will wait for the user to close the image browser before the application continues:

rc = DBiBrowse(
     "explore %s",
     MMDB_PLAY_FILE,
     "/employee/images/ajones.bmp",
     MMDB_PLAY_WAIT                   /* wait for browser to close */
     );

Be careful if you specify DBxPlay and MMDB_PLAY_NO_WAIT: When you issue DBaPlay or DBvPlay, the extender will create a temporary file if any of the following are true:

The temporary file is created in the directory specified by the TMP environment variable. If you specify MMDB_PLAY_WAIT, the extender deletes the temporary file after the object is played. However, if you specify MMDB_PLAY_NO_WAIT, the temporary file is not deleted. You will have to delete the temporary file yourself.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]