MCI_LOAD

This MCI command message loads a file. Support of this message by a device is optional. The parameters and flags for this message vary according to the selected device.

Parameters

DWORD lParam1

The following flags apply to all devices supporting MCI_LOAD:


MCI_NOTIFY

Specifies that MCI should post the MM_MCINOTIFY message when this command completes. The window that receives this message is specified in the dwCallback field of the data structure identified by lParam2.

MCI_TEST

Queries the device to determine if it can execute the command. The device returns an error if it is incapable of executing the command. It returns no error if it can handle the command. MCI returns control to the application without executing the command.

MCI_WAIT

Specifies that the load operation should finish before MCI returns control to the application.

MCI_LOAD_FILE

Indicates the lpfilename field of the data structure identified by lParam2 contains a pointer to a buffer containing the filename.

LPMCI_DGV_LOAD_PARMS lParam2

Specifies a far pointer to the MCI_DGV_LOAD_PARMS data structure. (Devices with additional parameters might replace this data structure with a device-specific data structure.)

Return Value

Returns zero if successful. Otherwise, it returns an MCI error code.

Comments

For digital-video devices supporting this command, it loads a file into the workspace for this instance of the device driver.

When a device is opened as a digital-video device, it loads a motion-video file into the workspace. When a device is opened as an overlay device, it loads a still image into the frame buffer. Overlay devices should use the MCI_RESTORE command rather than MCI_LOAD.

Loading a file sets the device status to stopped, and will cancel any signals set for the device instance. Files loaded with this command cannot be shared.

See Also

MCI_SAVE