|
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. 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 OleConvertIStorageToOLESTREAMEx(
IStorage * pStg,
| //Points 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 in bytes
| STGMEDIUM pmedium,
| //Points to STGMEDIUM of data
| LPOLESTREAM lpolestm
| //Points to the stream where the OLE1 storage is written
| );
|
|
Parameters
pStg
Points to the storage object to be converted to an OLE 1 storage.
cfFormat
Specifies the format of the presentation data. May be NULL, in which case the lWidth, lHeight, dwSize, and pmedium parameters are ignored. lWidth
Specifies the width of the object presentation data in HIMETRIC units.
lHeight
Specifies the height of the object presentation data in HIMETRIC units.
dwSize
Specifies the size of the data to be converted, in bytes.
pmedium
Points to the STGMEDIUM structure for the serialized data to be converted. See STGMEDIUM for more information.
lpolestm
Points to a stream where the persistent representation of the object is saved
using the OLE 1 storage model.
Return Values
S_OK
Indicates the conversion was completed successfully.
DV_E_STGMEDIUM
Specifies the hGlobal member of STGMEDIUM is NULL.
E_INVALIDARG
Specifies the dwSize parameter is NULL; or the pstg parameter is invalid; or the lpolestm parameter is invalid.
DV_E_TYMED
Specifies the tymed member of the STGMEDIUM structure is not TYMED_HGOLBAL or TYMED_ISTREAM.
Comments
This function converts an OLE 2 storage object to OLE 1 format. It differs
from the OleConvertIStorageToOLESTREAM function in that the presentation data to be written to the OLE 1 storage is
passed in.
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 must be either TYMED_HGLOBAL or TYMED_ISTREAM. The medium is not released by OleConvertIStorageToOLESTREAMEx.
See Also
CoIsOle1Class, OleConvertIStorageToOLESTREAM, OleConvertOLESTREAMToIStorage, OleConvertOLESTREAMToIStorageEx
Related LinksSoftware for Delphi and C++ Builder developers Software for Visual Studio .NET developers Software for Visual Basic 6 developers Delphi Tips&Tricks
MegaDetailed.NET
TMS Scripter Studio Pro components for Delphi/C++Builder
More Online Helps Win32 Programmer's Reference (win32.hlp) Win32 Multimedia Programmer's Reference (mmedia.hlp) Microsoft Windows Pen API Programmer's Reference (penapi.hlp) Microsoft Windows Sockets 2 Reference (sock2.hlp) Microsoft Windows Telephony API (TAPI) Programmer's Reference (sock2.hlp) Unix Manual Pages
|