ICaptureGraphBuilder::CopyCaptureFile method (strmif.h)

Note  The ICaptureGraphBuilder interface is deprecated. Use ICaptureGraphBuilder2 instead.
 
Copies the valid media data from the preallocated capture file.

Syntax

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

Parameters

[in] lpwstrOld

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

[in] lpwstrNew

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

[in] fAllowEscAbort

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.

[in] pCallback

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.

Requirements

   
Target Platform Windows
Header strmif.h (include Dshow.h)

See also

Error and Success Codes

ICaptureGraphBuilder Interface