HRESULT IPersistStream::Save(IStream *pIStream, BOOL EffacerModifications);
Si EffacerModifications vaut TRUE, alors il ne s'agit pas d'un enregistrement temporaire mais définif.
#include <windows.h>
#include <winbase.h>
#include <ole2.h>
IPersistStream *pIPersistStream;
IStream *pIStream;
...
if (pIPersistStream->Load(pIStream)!=S_OK)
{
...
}
...
if (pIPersistStream->IsDirty()!=S_OK)
{
...
if (pIPersistStream->Save(pIStream, TRUE)!=S_OK)
{
...
}
...
}
...