Opens an existing stream object within this storage object using the specified
access permissions in grfMode
| const wchar_t * pwcsName,
||//Points to name of stream to open
| void * reserved1,
||//Reserved; must be NULL
| DWORD grfMode,
||//Access mode for the new stream
| DWORD reserved2,
||//Reserved; must be zero
| IStream ** ppstm
||//Points to opened stream object
[in]Points to the name of the stream to open.
[in]Reserved for future use; must be NULL.
[in]Specifies the access mode to use when opening the stream. See the STGM
enumeration values for descriptions of the possible values.
[in]Reserved for future use; must be zero.
[out]Points to the location where the opened IStream
interface pointer is returned; only valid if the operation is successful.
This parameter is set to NULL if an error occurs.
The stream was successfully opened.
Insufficient permissions to open stream.
The stream with specified name does not exist.
The stream was not opened due to a lack of memory.
The value specified for the grfMode
flag is not a valid STGM
The specified combination of grfMode
flags is not supported. For example, if this method is called without the
Invalid value for pwcsName
The pointer specified for the stream object was invalid.
One of the parameters was invalid.
The object has been invalidated by a revert operation above it in the
The stream was not opened because there are too many open files.
There are restrictions on the permissions that can be given in grfMode
. For example, the permissions on this storage object restrict the permissions
on its streams.
Note to Callers
The OLE-provided compound file implementation of the IStorage::OpenStream
method does not support the following behaviors:
- The STGM_DELETEONRELEASE flag is not supported.
- Transacted mode is not supported for stream objects.
- Opening the same stream more than once from the same storage is not supported.
The STGM_SHARE_EXCLUSIVE flag must be specified.
Other implementations of IStorage
might support these features.
- Software for developers
Software for Android Developers
- More information resources
Unix Manual Pages