MCI_SAVE

This MCI command message saves the current file. Devices that modify files should not destroy the original copy until they receive this message. Support of this message by a device is optional.

Parameters

DWORD lParam1

The following flags apply to all devices supporting MCI_SAVE:


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 save operation should finish before MCI returns control to the application.

MCI_SAVE_FILE

Indicates the lpstrFileName field of the data structure identified by lParam2 contains a pointer to a buffer containing the destination filename. If a path is not specified, the file is placed in the directory specified with MCI_RESERVE. If MCI_RESERVE has not been used, the device driver uses the drive and directory associated with the application's task as the default. Any path specified must be on the disk drive associated with the explicit or implied reserve. The filename is required.

MCI_DGV_RECT

Specifies that the rc field of the data structure identified by lParam2 contains a valid rectangle. The rectangle specifies a region of the frame buffer that will be saved to the specified file. The first pair of coordinates specify the top, left corner of the rectangle and the second pair of coordinates specify the width and height of the rectangle.

Digital-video devices must use the MCI_CAPTURE command to capture the contents of the frame buffer. Overlay devices should also use MCI_CAPTURE. This flag is for compatibility with the existing MCI overlay command set.

MCI_DGV_SAVE_ABORT

Stops a save operation in progress. This must be the only flag present.

MCI_DGV_SAVE_KEEPRESERVE

Indicates that unused disk space left over from the original MCI_RESERVE command is not deallocated.

LPMCI_DGV_SAVE_PARMS lParam2

Specifies a far pointer to the MCI_DGV_SAVE_PARMS data structure.

Return Value

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

Comments

This command is supported by devices that return true to the MCI_GETDEVCAPS_CAN_SAVE query. For digital-video devices, MCI_CAPTURE is used to capture the contents of the frame buffer. Overlay devices can also use MCI_CAPTURE to save the frame buffer contents.

MCI_SAVE makes a permanent copy of the workspace contents. Any unused disk space is deallocated from the reserve after this command.

The current position is not affected by the progress of the save operation.

See Also

MCI_LOAD