IStorage::Revert

This method discards all changes that have been made to the storage object since the last commit operation.

HRESULT Revert( void );

Return Values

One of the values described in the following table is returned.

Value Description
S_OK The revert operation was successful.
E_PENDING Asynchronous Storage only: Part or all of the storages data is currently unavailable. For more information see IFillLockBytes and Asynchronous Storage.
STG_E_INSUFFICIENTMEMORY The revert operation could not be completed due to a lack of memory.
STG_E_TOOMANYOPENFILES The revert operation could not be completed because there are too many open files.
STG_E_REVERTED The storage object has been invalidated by a revert operation above it in the transaction tree.

Remarks

For storage objects opened in transacted mode, the IStorage::Revert method discards any uncommitted changes to this storage object or changes that have been committed to this storage object from nested elements.

After this method returns, any existing elements (substorages or streams) that were opened from the reverted storage object are invalid and can no longer be used. Specifying these reverted elements in any call except IStorage::Release returns the error STG_E_REVERTED

This method has no effect on storage objects opened in direct mode.

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS        

Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.