The AVISave function builds a file by combining data streams from other files or from memory.
HRESULT AVISave(
LPCTSTR szFile,
CLSID * pclsidHandler,
AVISAVECALLBACK lpfnCallback,
int nStreams,
PAVISTREAM pavi,
LPAVICOMPRESSOPTIONS lpOptions,
. . .
);
Returns AVIERR_OK if successful or an error otherwise.
This function creates a file, copies stream data into the file, closes the file, and releases the resources used by the new file. The last two parameters of this function identify a stream to save in the file and define the compression options of that stream. When saving more than one stream in an AVI file, repeat these two stream-specific parameters for each stream in the file.
A callback function (referenced by using lpfnCallback) can display status information and let the user cancel the save operation. The callback function uses the following format:
LONG PASCAL SaveCallback(int nPercent)
The nPercent parameter specifies the percentage of the file saved.
The callback function should return AVIERR_OK if the operation should continue and AVIERR_USERABORT if the user wishes to abort the save operation.
Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in vfw.h.
Import Library: Use vfw32.lib.
Unicode: Implemented as Unicode and ANSI versions on Windows NT.
AVIFile Functions and Macros Overview, AVIFile Functions, AVICOMPRESSOPTIONS