Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
This method discards all changes that have been made to the storage object since the last commit operation.
Syntax
HRESULT Revert(void); |
Parameters
None.
Return Value
The following table shows the return values for this method.
Value | Description |
---|---|
S_OK |
The revert operation was successful. |
E_PENDING |
Asynchronous Storage only: Part or all of the storage's data is currently unavailable. For more information see the IFillLockBytesinterface 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::Revertmethod 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::Releasereturns the error STG_E_REVERTED.
This method has no effect on storage objects opened in direct mode.
To determine whether the platform supports this interface, see Determining Supported COM APIs.
Requirements
Header | objidl.h, objidl.idl |
Library | ole32.lib, uuid.lib |
Windows Embedded CE | Windows CE 2.0 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |