Export (0) Print
Expand All

COleStreamFile::OpenStream

Opens an existing stream.

BOOL OpenStream( 
   LPSTORAGE lpStorage, 
   LPCTSTR lpszStreamName, 
   DWORD nOpenFlags = modeReadWrite|shareExclusive, 
   CFileException* pError = NULL  
);

lpStorage

Points to the OLE storage object that contains the stream to be opened. Cannot be NULL.

lpszStreamName

Name of the stream to be opened. Cannot be NULL.

nOpenFlags

Access mode to use when opening the stream. Exclusive and read/write modes are used by default. For the complete list of the available modes, see CFile::CFile.

pError

Points to a CFileException object or NULL. Supply this parameter if you want to monitor possible exceptions generated by attempting to open the stream.

Nonzero if the stream is opened successfully; otherwise 0.

A file exception will be thrown if the open fails and pError is not NULL.

For more information, see IStorage::OpenStream in the Windows SDK.

Header: afxole.h

Show:
© 2015 Microsoft