Microsoft DirectX 9.0

ICaptureGraphBuilder::CopyCaptureFile

Note   The ICaptureGraphBuilder interface is deprecated. Use ICaptureGraphBuilder2 instead.

Copies the valid media data from the preallocated capture file.

Syntax

HRESULT CopyCaptureFile(
    LPOLESTR lpwstrOld,
    LPOLESTR lpwstrNew,
    int fAllowEscAbort,
    IAMCopyCaptureFileProgress *pCallback
);

Parameters

lpwstrOld

[in] Pointer to a Unicode™ string containing the source file name.

lpwstrNew

[in] Pointer to a Unicode string containing the destination file name. Valid data is copied to this file.

fAllowEscAbort

[in] Value indicating whether pressing the ESC key will cancel the copy operation. TRUE indicates that it will; FALSE indicates that this method will ignore that keystroke.

pCallback

[in] Optional pointer to an IAMCopyCaptureFileProgress show the progress (percentage complete) of the copy operation.

Return Value

Returns an HRESULT value.

Remarks

The new file will contain only valid data and therefore can be much shorter than the source file. Typically, you will always capture to the same huge preallocated file and use this method to copy the data you want to save from each capture to a new file.

If you specify pCallback, the Progress method on the IAMCopyCaptureFileProgress interface will be called periodically with an integer between 0 and 100 representing the percentage complete.

See Also