MCI_CAPTURE

This MCI command message captures the contents of the frame buffer and stores it in a specified file.

Parameters DWORD lParam1 The following flags apply to all devices supporting MCI_CAPTURE:

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

MCI_DGV_CAPTURE_AS

Indicates the lpstrFileName field of the data structure identified by lParam2 contains a pointer to a buffer specifying the destination path and filename. (This flag is required.)

MCI_DGV_CAPTURE_AT

Specifies that the rc field of the data structure identified by lParam2 contains a valid rectangle. The rectangle specifies the rectangular region within the frame buffer that is cropped and saved to disk. If omitted, the cropped region defaults to the rectangle specified or defaulted on a previous MCI_PUT command that specifies the source area for this instance of the device driver.


LPMCI_DGV_CAPTURE_PARMS lParam2 Specifies a far pointer to a MCI_DGV_CAPTURE_PARMS data structure.

Return Value

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

Comments

This command might fail if the device is currently playing motion video or executing some other resource-intensive operation. If the frame buffer is updated in real time, the update is momentarily paused so that a complete image is captured. Depending on the device, the pause for MCI_CAPTURE might cause visual or audible effects. The desired file format, compression algorithm, and quality level must be previously specified by the MCI_SET or MCI_SETVIDEO command, or allowed to default.