|
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
| Last news from Greatis Software |
 |
|
Nostalgia .Net |
|
.Net is powerful, but not all-powerful, so sometimes we need to use Win32 API for our .Net applications. It's simple enough with Platform Invoke if you have Win32 skill, but we do not always have time to dig the ancient documentation, declare the special types that are compatible with Win32, find the values of the Win32's constants and so on. Nostalgia .Net offers several simple-to-use classes, and components that will allow you to forget about the headache of Win32 and just use the power of Win32 in your application the same way as you use the native. Net classes. More » |
| Recommended software for developers |
 |
|
Ultimate Pack |
|
Component pack for Delphi and C++ Builder that contains runtime form designer, runtime object inspector, print suite and much more for the very special price. More » |
 |
|
Form Designer .Net |
|
Unique runtime form design solution that allows to edit any form in .Net WinForms application at runtime with full source codes for only 300 euro! More » |
 |
|
Print Suite .Net |
|
Print Suite .Net is a set of components for easy printing texts, images and grids from your WinForms applications. Full C# source codes are available More » |
 |
|
Gradient Controls .Net |
|
Gradient Controls .Net offers controls with gradient background feature. Labels, panels and so on... Full C# source codes are available More » |
 |
|
Greatis iGrid |
|
iGrid plots drawing grid right over your desktop, so you can use it everywhere, with any drawing application without any special plugins for different graphic editors. More » |
All the contacts and projectsDmitry Vasiliev (just.dmitry)
Related LinksSoftware for Visual Studio .NET developers Software for Delphi and C++ Builder developers Software for Visual Basic 6 developers Delphi Tips&Tricks MegaDetailed.NET More Online Helps Win32 Programmer's Reference Win32 Multimedia Programmer's Reference OLE Programmer's Reference Microsoft Windows Pen API Programmer's Reference Microsoft Windows Sockets 2 Reference Microsoft Windows Telephony API (TAPI) Programmer's Reference Unix Manual Pages
|