save

The save command saves an MCI file. Video-overlay and waveform-audio devices recognize this command. Although digital-video devices and MIDI sequencers also recognize this command, the MCIAVI and MCISEQ drivers do not support it.

wsprintf(lpstrCommand, "save %s %s %s", lpszDeviceID, lpszFilename, 
    lpszFlags); 
 

Parameters

lpszDeviceID
Identifier of an MCI device. This identifier or alias is assigned when the device is opened.
lpszFilename
Flag specifying the name of the file being saved and, optionally, additional flags modifying the save operation. The following table lists device types that recognize the save command and the flags used by each type:
digitalvideo abort
at rectangle
filename
keepreserve
overlay at rectangle filename
sequencer filename
waveaudio filename

The following table lists the flags that can be specified in the lpszFilename parameter and their meanings:
abort Stops a save operation in progress. If used, this must be the only item present.
at rectangle Specifies a rectangle relative to the frame buffer origin. The rectangle is specified as X1 Y1 X2 Y2. The coordinates X1 Y1 specify the upper left corner and the coordinates X2 Y2 specify the width and height.

For digital-video devices, the capture command is used to capture the contents of the frame buffer.

filename Specifies the filename to assign to the data file. If a path is not specified, the file will be placed on the disk and in the directory previously specified on the explicit or implicit reserve command. If reserve has not been issued, the default drive and directory are those associated with the application's task. If a path is specified, the device might require it to be on the disk drive specified by the explicit or implicit reserve. This flag is required.
keepreserve Specifies that unused disk space left over from the original reserve command is not deallocated.

lpszFlags
Can be "wait", "notify", or both. For digital-video and VCR devices, "test" can also be specified. For more information about these flags, see The Wait, Notify, and Test Flags.

Return Values

Returns zero if successful or an error otherwise.

Remarks

The filename variable is required if the device was opened using the "new" device identifier.

The following command saves the entire video buffer to a file named VCAPFILE.TGA:

save vboard c:\vcap\vcapfile.tga
 

QuickInfo

  Windows NT: Requires version 3.1 or later.
  Windows: Requires Windows 95 or later.
  Windows CE: Unsupported.

See Also

MCI Overview, MCI Command Strings, capture, reserve