OleConvertOLESTREAMToIStorageEx

Converts the specified object from the OLE 1 storage model to an OLE 2 structured storage object including 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.

HRESULT OleConvertOLESTREAMToIStorageEx(

LPOLESTREAM lpolestm,
//Points to the a stream where the OLE1 storage is written
IStorage * pstg,
//Points to OLE 2 storage object
CLIPFORMAT * pcfFormat,
//Points to location where presentation data is returned
LONG * plWidth,
//Points to location where width value is returned
LONG * plHeight,
//Points to location where height value is returned
DWORD * pdwSize,
//Points to location where size is returned
STGMEDIUM pmedium
//Points to location where the STGMEDIUM structure is returned
);

Parameters

lpolestm

Points to a stream that contains the persistent representation of the object in the OLE 1 storage format.

pstg

Points to the OLE 2 structured storage object.

pcfFormat

Points to the location where the format of the presentation data is returned. May be NULL, indicating the absence of presentation data.

plWidth

Points to the location where the width value (in HIMETRIC) of the presentation data is returned.

plHeight

Points to the location where the height value (in HIMETRIC) of the presentation data is returned.

pdwSize

Points to the location where the size in bytes of the converted data is returned.

pmedium

Points to the location where the STGMEDIUM structure for the converted serialized data is returned.

Return Values

S_OK

Indicates the conversion was completed successfully.

DV_E_TYMED|

Specifies the value of the tymed member of STGMEDIUM is not TYMED_ISTREAM or TYMED_NULL.

Comments

This function converts an OLE 1 object to an OLE 2 structured storage object. You can use this function to update OLE 1 objects to OLE 2 objects when a new version of the object application supports OLE 2.

This function differs from the OleConvertOLESTREAMToIStorage function in that the presentation data read from the OLESTREAM structure is passed out and the newly created OLE 2 storage object does not contain a presentation stream.

Since this function can specify which presentation data to convert, it can be used by applications that do not use OLE's default caching resources but do use the conversion resources.

The tymed member of STGMEDIUM can only be TYMED_NULL or TYMED_ISTREAM. If TYMED_NULL, then the data will be returned in a global handle through the hGlobal member of STGMEDIUM, otherwise data will be written into the pstm member of this structure.

See Also

CoIsOle1Class, OleConvertIStorageToOLESTREAM, OleConvertIStorageToOLESTREAMEx, OleConvertOLESTREAMToIStorage

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