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);

IltmmMemory_QueryInterface(pMem, &IID_IStream, (void**)&pStream);
// Get current stream position
IStream_Seek(pStream, li, STREAM_SEEK_CUR, &liOffset);

IltmmConvert_SaveSettingsToStream
(g_convert, (IUnknown*)pMem, ltmmConvert_Settings_All);

// Seek back
IStream_Seek(pStream, liOffset, STREAM_SEEK_SET, NULL);
IStream_Release(pStream);
IltmmConvert_LoadSettingsFromStream
(g_convert, (IUnknown*)pMem, ltmmConvert_Settings_All);
IltmmMemory_Release(pMem);