IltmmConvert::SaveSettingsToStream Example for C++

IltmmMemory* pMem;
IStream *pStream = NULL;
LARGE_INTEGER li;
ULARGE_INTEGER liOffset;

li.QuadPart = 0;

CoCreateInstance(CLSID_ltmmMemory, NULL,
   CLSCTX_INPROC_SERVER, IID_IltmmMemory, (void**)&pMem);
pMem->QueryInterface(IID_IStream, (void**)&pStream);
// Get current stream position
pStream->Seek(li, STREAM_SEEK_CUR, &liOffset);
m_convert->SaveSettingsToStream((IUnknown*)pMem, ltmmConvert_Settings_All);

// Seek back
pStream->Seek(liOffset, STREAM_SEEK_SET , NULL);
pStream->Release();
m_convert->LoadSettingsFromStream((IUnknown*)pMem, ltmmConvert_Settings_All);
pMem->Release();