UID | title | description | helpviewer_keywords | old-location | tech.root | ms.assetid | ms.date | ms.keywords | req.header | req.include-header | req.target-type | req.target-min-winverclnt | req.target-min-winversvr | req.kmdf-ver | req.umdf-ver | req.ddi-compliance | req.unicode-ansi | req.idl | req.max-support | req.namespace | req.assembly | req.type-library | req.lib | req.dll | req.irql | targetos | req.typenames | req.redist | ms.custom | f1_keywords | dev_langs | topic_type | api_type | api_location | api_name | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
NF:objidl.IStream.Commit |
IStream::Commit (objidl.h) |
The Commit method ensures that any changes made to a stream object open in transacted mode are reflected in the parent storage. |
|
stg\istream_commit.htm |
Stg |
335c3a53-ca6a-42f3-bbf9-684ed48591e6 |
12/05/2018 |
Commit, Commit method [Structured Storage], Commit method [Structured Storage],IStream interface, IStream interface [Structured Storage],Commit method, IStream.Commit, IStream::Commit, _stg_istream_commit, objidl/IStream::Commit, stg.istream_commit |
objidl.h |
Windows |
Windows 2000 Professional [desktop apps \| UWP apps] |
Windows 2000 Server [desktop apps \| UWP apps] |
Objidl.idl |
Uuid.lib |
Ole32.dll |
Windows |
19H1 |
|
|
|
|
|
|
The Commit method ensures that any changes made to a stream object open in transacted mode are reflected in the parent storage. If the stream object is open in direct mode, IStream::Commit has no effect other than flushing all memory buffers to the next-level storage object. The COM compound file implementation of streams does not support opening streams in transacted mode.
Controls how the changes for the stream object are committed. See the STGC enumeration for a definition of these values.
This method can return one of these values.
Return code | Description |
---|---|
S_OK | Changes to the stream object were successfully committed to the parent level. |
E_PENDING | Asynchronous Storage only: Part or all of the stream's data is currently unavailable. |
STG_E_MEDIUMFULL | The commit operation failed due to lack of space on the storage device. |
STG_E_REVERTED | The object has been invalidated by a revert operation above it in the transaction tree. |
The Commit method ensures that changes to a stream object opened in transacted mode are reflected in the parent storage. Changes that have been made to the stream since it was opened or last committed are reflected to the parent storage object. If the parent is opened in transacted mode, the parent may revert at a later time, rolling back the changes to this stream object. The compound file implementation does not support the opening of streams in transacted mode, so this method has very little effect other than to flush memory buffers. For more information, see IStream - Compound File Implementation.
If the stream is open in direct mode, this method ensures that any memory buffers have been flushed out to the underlying storage object. This is much like a flush in traditional file systems.
The IStream::Commit method is useful on a direct mode stream when the implementation of the IStream interface is a wrapper for underlying file system APIs. In this case, IStream::Commit would be connected to the file system's flush call.