save command

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.

To send this command, call the mciSendString function with the lpszCommand parameter set as follows.


_stprintf_s(
  lpszCommand, 
  TEXT("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.

ValueMeaningMeaning
digitalvideoabort at rectanglefilenamekeepreserve
overlayat rectanglefilename
sequencerfilename
waveaudiofilename

 

The following table lists the flags that can be specified in the lpszFilename parameter and their meanings.

ValueMeaning
abortStops a save operation in progress. If used, this must be the only item present.
at rectangleSpecifies 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.

filenameSpecifies 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.
keepreserveSpecifies 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 Value

Returns zero if successful or an error otherwise.

Remarks

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

Examples

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

save vboard c:\vcap\vcapfile.tga

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

See also

MCI
MCI Command Strings
capture
reserve

 

 

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.