hwndOwner (HWND) - input

      Window handle of the owner window. If this parameter is NULL, the currently active window is used.

    pszFile (PSZ) - input

      Pointer to a multimedia file name. Compound-file names are also supported. For example:
      a:\path\file+element

    ulFlags (ULONG) - input

      MCI_OWNERISPARENT

        Indicates that the owner window should be used as the parent window for any default window that is created. If this flag is passed to a device that does not support a parent window, an error is returned.
      MCI_STOPACTIVE
        Indicates that any currently active command issued by either mciPlayFile or mciPlayResource should be stopped.
      MCI_ASYNC
        Indicates that the command should be processed asynchronously. A rendezvous command will not be done.
      MCI_ASYNCRENDEZVOUS
        Indicates that the command should proceed asynchronously. A rendezvous command will be done.
      MCI_RENDEZVOUS
        Indicates that the call should wait for a currently pending asynchronous command to complete.

        • If no command is pending, then it returns immediately.

        • If an asynchronous command is not pending, this function will return immediately. This flag indicates that the command should wait until a pending asynchronous play command completes and then return.

        • If a synchronous (default) play command is pending, this command should return immediately with an MCIERR_NO_ASYNC_PLAY_ACTIVE.

        • If another MCI_RENDEZVOUS command is pending, this command should return immediately with an MCIERR_NO_ASYNC_PLAY_ACTIVE.

        pszTitle (PSZ) - input

          Title for window if one is generated. The title is ignored if a window would not be generated. (For example, an audio file is to be played).

        hwndViewport (HWND) - input

          Window handle for displaying the video image. If a viewport window is not specified, then a default video window is displayed. This parameter only has an effect when the data type supports video.

        rc (ULONG) - returns

          Return codes indicating success or type of failure:

          MCIERR_SUCCESS

            If the function succeeds, 0 is returned.
          MCIERR_NO_ASYNC_PLAY_ACTIVE
            A synchronous (default) play command is pending or no asynchronous play is currently active for the associated owner window.
          MCIERR_MISSING_PARAMETER
            Required parameter is missing.
          MCIERR_FILE_ATTRIBUTE
            File is read only, or is opened for write mode by other application.
          MCIERR_INSTANCE_INACTIVE
            The device is currently inactive. Can be returned if another application has opened or acquired the device for exclusive use. Issue MCI_ACQUIREDEVICE to activate the device ID.
          MCIERR_UNSUPPORTED_FLAG
            Given flag is unsupported for this device.
          MCIERR_INVALID_CALLBACK_HANDLE
            Given callback handle is invalid.
          MCIERR_UNSUPPORTED_FUNCTION
            Unsupported function.
          MCIERR_FLAGS_NOT_COMPATIBLE
            Flags can not be used together.
          MCIERR_FILE_NOT_FOUND
            File has not been loaded.
          MCIERR_DUPLICATE_ALIAS
            Alias already exists.
          MCIERR_INVALID_BUFFER
            Invalid return buffer given.
          MCIERR_CANNOT_LOAD_DRIVER
            The driver could not be loaded.
          MCIERR_DEVICE_LOCKED
            The device is acquired for exclusive use.
          MCIERR_OUT_OF_MEMORY
            Out of memory.


          [Back] [Next]