This function plays a multimedia data file, (such as digital audio or video), or a digital audio element of a RIFF compound file, using media control interface commands. It opens, plays, and closes the file. mciPlayFile is a 32-bit function that is also provided as a 16-bit entry point.

The mciPlayFile function requires a message queue.

#define INCL_MACHDR
#define INCL_MCIOS2
#include <os2.h>

HWND     hwndOwner;     /*  Window handle. */
PSZ      pszFile;       /*  Pointer to file name. */
ULONG    ulFlags;       /*  Flags. */
PSZ      pszTitle;      /*  Window title. */
HWND     hwndViewport;  /*  Window handle for video image. */
ULONG    rc;            /*  Return code. */

rc = mciPlayFile(hwndOwner, pszFile, ulFlags,
       pszTitle, hwndViewport);


[Back] [Next]