Declaration
Automation:
void  Purge ( [in]   enum HistoryPurgeLevel  level) ;
Native (C++):
HRESULT  Purge ( [in]   enum HistoryPurgeLevel  level) ;
Parameters
level Purge level. Can be one of the following values:
Purge Level Value Description
HistoryPurgeTail 0 All phantom operations (or operation tail) are dropped and removed.
HistoryPurgeBranches 1 All branches except the current one are dropped and removed.
HistoryPurgeAllButCurrent 2 All operations in a history are deleted. The document state is NOT changed, all modifications are "merged" into the single operation, which becomes an operation list root.
HistoryPurgeAll 3 Remove all operations except the very first one.
Return Value
S_OK or standard OLE error code.
Remarks
Purges a document's operation history. See Working with History section for more information. Complexity: constant-time for all purge levels except HistoryPurgeAllButCurrent and linear-time for HistoryPurgeAllButCurrent.
Examples

Purging history

C#Copy Code
// fdoc is initialized elsewhere
fdoc.FillByte(0x35, 100, 40);
// ...
fdoc.Purge(FileDocumentLib.HistoryPurgeLevel.HistoryPurgeAll);  // discard all operations
    

See Also