Digital Video Extensions

DWORD lParam1

The following flags apply to digital-video devices:

MCI_DGV_OPEN_PARENT

Indicates the parent window handle is specified in the hWndParent field of the data structure identified by lParam2. This handle is required for some window styles.

MCI_DGV_OPEN_WS

Indicates a window style is specified in the dwStyle field of the data structure identified by lParam2. The device driver creates and displays a window with this style if the application does not provide one. The style parameter uses the window constants defined in WINDOWS.H (such as WS_CHILD, WS_OVERLAPPEDWINDOW, or WS_POPUP).

LPMCI_DGV_OPEN_PARMS lParam2

Specifies a far pointer to the MCI_DGV_OPEN_PARMS data structure.

Return Value

Returns zero if the open is successful. If an error occurs, it returns one of the following values:


MCIERR_CANNOT_LOAD_DRIVER

Error loading media device driver.

MCIERR_DEVICE_OPEN

The device name is in use by this task. Use a unique alias.

MCIERR_DUPLICATE_ALIAS

The specified alias is an open device in this task.

MCIERR_EXTENSION_NOT_FOUND

Cannot deduce a device type from the extension.

MCIERR_FILENAME_REQUIRED

A valid filename is required.

MCIERR_MISSING_PARAMETER

Required parameter is missing.

MCIERR_MUST_USE_SHAREABLE

The device is already open; use the shareable flag with each open.

MCIERR_NO_ELEMENT_ALLOWED

An element name cannot be used with this device.


Comments

If MCI_OPEN_SHAREABLE is not specified when a device or device element is initially opened, then all subsequent MCI_OPEN messages to the device or device element will fail. If the device or device element is already open, subsequent opens will fail if this flag is not specified.

Case is ignored in the device name, but there must not be any leading or trailing blanks.

To use automatic type selection (via the [mci extensions] section of the WIN.INI file), assign the filename (including file extension) to the lpstrElementName field, assign a NULL pointer to the lpstrDeviceType field, and set the MCI_OPEN_ELEMENT flag.

See Also

MCI_CLOSE