다음을 통해 공유


COleStreamFile::CreateMemoryStream

Safely creates a new stream out of global, shared memory where a failure is a normal, expected condition.

BOOL CreateMemoryStream(
   CFileException* pError = NULL 
);

Parameters

  • pError
    Points to a CFileException object or NULL that indicates the completion status of the create operation. Supply this parameter if you want to monitor possible exceptions generated by attempting to create the stream.

Return Value

Nonzero if the stream is created successfully; otherwise 0.

Remarks

The memory is allocated by the OLE subsystem.

For more information, see CreateStreamOnHGlobal in the Windows SDK.

Requirements

Header: afxole.h

See Also

Concepts

COleStreamFile Class

COleStreamFile Members

Hierarchy Chart

COleStreamFile::OpenStream

COleStreamFile::CreateStream

CFileException Class