OleConvertIStorageToOLESTREAMEx
Converts the
specified storage object from OLE 2 structured storage to the OLE 1 storage
model, including the presentation data. This is one of several compatibility
functions.
WINOLEAPI OleConvertIStorageToOLESTREAMEx(
IStorage * pStg, |
//Pointer to the OLE 2 storage object to be
converted |
CLIPFORMAT
cfFormat, |
//Presentation data format |
LONG lWidth, |
//Width in HIMETRIC |
LONG lHeight, |
//Height in HIMETRIC |
DWORD dwSize, |
//Size of data |
STGMEDIUM pmedium, |
//Pointer to data |
LPOLESTREAM lpolestm |
//Pointer to the stream where the OLE1 storage is
written |
); |
|
Parameters
pStg
[in] Pointer
to the IStorage interface on the storage object to be converted to an
OLE 1 storage.
cfFormat
[in] Format
of the presentation data. May be NULL, in which case the lWidth, lHeight,
dwSize, and pmedium parameters are ignored.
lWidth
[in] Width of
the object presentation data in HIMETRIC units.
lHeight
[in] Height
of the object presentation data in HIMETRIC units.
dwSize
[in] Size of
the data, in bytes, to be converted.
pmedium
[in] Pointer
to the STGMEDIUM
lpolestm
[out] Pointer
to a stream where the persistent representation of the object is saved using
the OLE 1 storage model.
Return Values
This function
supports the standard return value E_INVALIDARG, as well as the following:
S_OK
The
conversion was completed successfully.
DV_E_STGMEDIUM
The hGlobal
member of STGMEDIUM
DV_E_TYMED
The tymed
member of the STGMEDIUM structure is not TYMED_HGLOBAL or TYMED_ISTREAM.
Remarks
The OleConvertIStorageToOLESTREAMEx
function converts an OLE 2 storage object to OLE 1 format. It differs from the OleConvertIStorageToOLESTREAM
Because OleConvertIStorageToOLESTREAMEx
can specify which presentation data to convert, it can be used by applications
that do not use OLE default caching resources but do use OLE s conversion
resources.
The value of
the tymed member of STGMEDIUM
See Also