Export (0) Print
Expand All

OleConvertIStorageToOLESTREAM function

The OleConvertIStorageToOLESTREAM function converts the specified storage object from OLE 2 structured storage to the OLE 1 storage object model but does not include the presentation data. This is one of several compatibility functions.

Syntax


WINOLEAPI OleConvertIStorageToOLESTREAM(
  _In_   IStorage *pStg,
  _Out_  LPOLESTREAM lpolestream
);

Parameters

pStg [in]

Pointer to the IStorage interface on the storage object to be converted to an OLE 1 storage.

lpolestream [out]

Pointer to an OLE 1 stream structure where the persistent representation of the object is saved using the OLE 1 storage model.

Return value

This function supports the standard return value E_INVALIDARG, in addition to the following:

S_OK

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

CONVERT10_E_STG_NO_STD_STREAM

Object cannot be converted because its storage is missing a stream.

CONVERT10_S_NO_PRESENTATION

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

Remarks

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

On entry, the stream to which lpolestm points 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 device-independent bitmap (DIB) format. When Paintbrush objects are converted using OleConvertIStorageToOLESTREAM, no presentation data is added to the OLESTREAM structure. To include presentation data, use the OleConvertIStorageToOLESTREAMEx function instead.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Ole2.h

Library

Ole32.lib

DLL

Ole32.dll

See also

CoIsOle1Class
OleConvertIStorageToOLESTREAMEx
OleConvertOLESTREAMToIStorage
OleConvertOLESTREAMToIStorageEx

 

 

Community Additions

ADD
Show:
© 2014 Microsoft