ILMDVRSource::CopyBufferToFile Example for C++

void CDVRSinkDlg::OnCopyBufferToFile(ILMDVRSource* pSource)
{
   BSTR targetFile = ::SysAllocString(L"C:\\Temp\\CapturedVideo.MPG");
   double startPos;
   double endPos;

   pSource-> CopyBufferToFile  (targetFile, startPos, endPos);

   ::SysFreeString(targetFile);
}