Converts the specified storage object from OLE 2 structured storage to the OLE 1 storage model but does not include the presentation data. This is one of several compatibility functions. You can use these functions to determine if an object class is from OLE 1 and to convert objects between OLE 1 and OLE 2 storage formats.


IStorage * pStg,
//Points to the OLE 2 storage object to be converted
//Points to the stream where the OLE1 storage is written



Points to the storage object to be converted to an OLE 1 storage.


Points to a stream where the persistent representation of the object is saved using the OLE 1 storage model.

Return Values


Indicates the storage object was successfully converted and the OLESTREAM structure contains the persistent representation of an OLE 1 object.


Indicates object cannot be converted because its storage is missing a stream.


Indicates the specified storage object contains a Paintbrush object in DIB format and there is no presentation data in the OLESTREAM.


Indicates invalid value for the pstg or lpolestm parameters.


This function converts an OLE 2 storage object to OLE 1 format. The OLESTREAM code implemented for OLE 1 must be available.

On entry, the stream pointed to by lpolestm should be created and positioned just as it would be for an OleSaveToStream call. On exit, the stream contains the persistent representation of the object using OLE 1 storage.

Note Paintbrush objects are dealt with differently from other objects because their native data is in DIB format. When Paintbrush objects are converted using OleConvertIStorageToOLESTREAM, no presentation data is added to the OLESTREAM. To include presentation data, use the OleConvertIStorageToOLESTREAMEx function instead.

See Also

CoIsOle1Class, OleConvertIStorageToOLESTREAMEx, OleConvertOLESTREAMToIStorage, OleConvertOLESTREAMToIStorageEx

Software for developers
Delphi Components
.Net Components
Software for Android Developers
More information resources
Unix Manual Pages
Delphi Examples
Databases for Amazon shops developers
Amazon Categories Database
Browse Nodes Database