' ########################################################################################
' Microsoft Windows
' File: Ole2.inc
' Contents: Main OLE2 header; Defines Linking and Emmebbeding interfaces, and API's.
' Copyright (c) 2011 Jos? Roca
' Portions Copyright (c) Microsoft Corporation.
' All Rights Reserved.
' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
' EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
' MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
' ########################################################################################
#IF NOT %DEF(PBX_Ole2_PBI)
#DEFINE PBX_Ole2_PBI
%EQUATE `OLE2_INC = 1
#INCLUDE ONCE "Core/Windows.inc"
'// Set packing to 8
'#include <pshpack8.h>
#INCLUDE ONCE "Legacy/Platform/WinError.inc"
#INCLUDE ONCE "Legacy/System/ObjBase.inc"
#INCLUDE ONCE "Legacy/COM/OleAuto.inc"
'// View OBJECT Error Codes
%EQUATE `E_DRAW = %VIEW_E_DRAW
'// IDataObject Error Codes
%EQUATE `DATA_E_FORMATETC = %DV_E_FORMATETC
'// Common stuff gleamed from OLE.2,
'/* verbs */
%EQUATE `OLEIVERB_PRIMARY = 0&
%EQUATE `OLEIVERB_SHOW = -1&
%EQUATE `OLEIVERB_OPEN = -2&
%EQUATE `OLEIVERB_HIDE = -3&
%EQUATE `OLEIVERB_UIACTIVATE = -4&
%EQUATE `OLEIVERB_INPLACEACTIVATE = -5&
%EQUATE `OLEIVERB_DISCARDUNDOSTATE = -6&
%EQUATE `OLEIVERB_PROPERTIES = -7&
'// for OleCreateEmbeddingHelper flags; roles in low word; options in high word
%EQUATE `EMBDHLP_INPROC_HANDLER = &H0000
%EQUATE `EMBDHLP_INPROC_SERVER = &H0001
%EQUATE `EMBDHLP_CREATENOW = &H00000000
%EQUATE `EMBDHLP_DELAYCREATE = &H00010000
'/* extended create function flags */
%EQUATE `OLECREATE_LEAVERUNNING = &H00000001
'/* pull in the MIDL generated header */
#INCLUDE ONCE "Legacy/COM/OleIdl.inc"
'/****** DV APIs ***********************************************************/
'/* This function is declared in objbase.h and ole2.h.
' IsolationAware support is via objbase.h.
'*/
'#if !defined(ISOLATION_AWARE_ENABLED) \
' || !ISOLATION_AWARE_ENABLED \
' || !defined(_OBJBASE_H_) \
' || !defined(CreateDataAdviseHolder)
'WINOLEAPI CreateDataAdviseHolder(OUT LPDATAADVISEHOLDER FAR* ppDAHolder);
'#endif
'/****** OLE API Prototypes ************************************************/
DECLARE FUNCTION OleBuildVersion LIB "ole32.dll" ALIAS "OleBuildVersion" ( ) AS QUAD
'/* helper functions */
DECLARE FUNCTION ReadClassStg LIB "ole32.dll" ALIAS "ReadClassStg" ( BYVAL pStg AS IStorage , BYREF pclsid AS GUID ) AS LONG
DECLARE FUNCTION WriteClassStg LIB "ole32.dll" ALIAS "WriteClassStg" ( BYVAL pStg AS IStorage
 , BYREF rclsid AS GUID
 ) AS LONG
DECLARE FUNCTION ReadClassStm LIB "ole32.dll" ALIAS "ReadClassStm" ( BYVAL pStm AS IStream
 , BYREF pclsid AS GUID
 ) AS LONG
DECLARE FUNCTION WriteClassStm LIB "ole32.dll" ALIAS "WriteClassStm" ( BYVAL pStm AS IStream
 , BYREF rclsid AS GUID
 ) AS LONG
DECLARE FUNCTION WriteFmtUserTypeStg LIB "ole32.dll" ALIAS "WriteFmtUserTypeStg" ( BYVAL pStg AS IStorage
 , BYVAL cf AS DWORD
 , BYREF lpszUserType AS WSTRINGZ
 ) AS LONG
DECLARE FUNCTION ReadFmtUserTypeStg LIB "ole32.dll" ALIAS "ReadFmtUserTypeStg" ( BYVAL pStg AS IStorage
 , BYREF pcf AS DWORD
 , BYREF lplpszUserType AS DWORD
 ) AS LONG
'/* init/term */
DECLARE FUNCTION OleInitialize LIB "ole32.dll" ALIAS "OleInitialize" ( OPTIONAL BYVAL pvReserved AS QUAD ) AS LONG
DECLARE SUB OleUninitialize LIB "ole32.dll" ALIAS "OleUninitialize" () ' void
'/* APIs to query whether (Embedded/Linked) object can be created from
' the data object */
DECLARE FUNCTION OleQueryLinkFromData LIB "ole32.dll" ALIAS "OleQueryLinkFromData" ( BYVAL pSrcDataObject AS IDataObject ) AS LONG
DECLARE FUNCTION OleQueryCreateFromData LIB "ole32.dll" ALIAS "OleQueryCreateFromData" ( BYVAL pSrcDataObject AS IDataObject
 ) AS LONG
'/* Object creation APIs */
DECLARE FUNCTION OleCreate LIB "ole32.dll" ALIAS "OleCreate" ( BYREF rclsid AS GUID , BYREF riid AS GUID , BYVAL renderopt AS QUAD , BYREF pFormatEtc AS FORMATETC , BYVAL pClientSite AS IOleClientSite , BYVAL pStg AS IStorage , BYREF ppvObject AS ANY ) AS LONG
DECLARE FUNCTION OleCreateEx LIB "ole32.dll" ALIAS "OleCreateEx" ( BYREF rclsid AS GUID
 , BYREF riid AS GUID
 , BYVAL dwFlags AS DWORD
 , BYVAL renderopt AS DWORD
 , BYVAL cFormats AS DWORD
 , BYREF rgAdvf AS DWORD
 , BYREF rgFormatEtc AS FORMATETC
 , BYVAL pAdviseSink AS IAdviseSink
 , BYREF rgdwConnection AS DWORD
 , BYVAL pClientSite AS IOleClientSite
 , BYVAL pStg AS IStorage
 , BYREF ppvObj AS ANY
 ) AS LONG
DECLARE FUNCTION OleCreateFromData LIB "ole32.dll" ALIAS "OleCreateFromData" ( BYVAL pSrcDataObj AS IDataObject
 , BYREF riid AS GUID
 , BYVAL renderopt AS DWORD
 , BYREF pFormatEtc AS FORMATETC
 , BYVAL pClientSite AS IOleClientSite
 , BYVAL pStg AS IStorage
 , BYREF ppvObj AS ANY
 ) AS LONG
DECLARE FUNCTION OleCreateFromDataEx LIB "ole32.dll" ALIAS "OleCreateFromDataEx" ( BYVAL pSrcDataObj AS IDataObject
 , BYREF riid AS GUID
 , BYVAL dwFlags AS DWORD
 , BYVAL renderopt AS DWORD
 , BYVAL cFormats AS DWORD
 , BYREF rgAdvf AS DWORD
 , BYREF rgFormatEtc AS FORMATETC
 , BYVAL pAdviseSink AS IAdviseSink
 , BYREF rgdwConnection AS DWORD
 , BYVAL pClientSite AS IOleClientSite
 , BYVAL pStg AS IStorage
 , BYREF ppvObj AS ANY
 ) AS LONG
DECLARE FUNCTION OleCreateLinkFromData LIB "ole32.dll" ALIAS "OleCreateLinkFromData" ( BYVAL pSrcDataObj AS IDataObject
 , BYREF riid AS GUID
 , BYVAL renderopt AS DWORD
 , BYREF pFormatEtc AS FORMATETC
 , BYVAL pClientSite AS IOleClientSite
 , BYVAL pStg AS IStorage
 , BYREF ppvObj AS ANY
 ) AS LONG
DECLARE FUNCTION OleCreateLinkFromDataEx LIB "ole32.dll" ALIAS "OleCreateLinkFromDataEx" ( BYVAL pSrcDataObj AS IDataObject
 , BYREF riid AS GUID
 , BYVAL dwFlags AS DWORD
 , BYVAL renderopt AS DWORD
 , BYVAL cFormats AS DWORD
 , BYREF rgAdvf AS DWORD
 , BYREF rgFormatEtc AS FORMATETC
 , BYVAL pAdviseSink AS IAdviseSink
 , BYREF rgdwConnection AS DWORD
 , BYVAL pClientSite AS IOleClientSite
 , BYVAL pStg AS IStorage
 , BYREF ppvObj AS ANY
 ) AS LONG
DECLARE FUNCTION OleCreateStaticFromData LIB "ole32.dll" ALIAS "OleCreateStaticFromData" ( BYVAL pSrcDataObj AS IDataObject
 , BYREF riid AS GUID
 , BYVAL renderopt AS DWORD
 , BYREF pFormatEtc AS FORMATETC
 , BYVAL pClientSite AS IOleClientSite
 , BYVAL pStg AS IStorage
 , BYREF ppvObj AS ANY
 ) AS LONG
DECLARE FUNCTION OleCreateLink LIB "ole32.dll" ALIAS "OleCreateLink" ( BYVAL pmkLinkSrc AS IMoniker
 , BYREF riid AS GUID
 , BYVAL renderopt AS DWORD
 , BYREF pFormatEtc AS FORMATETC
 , BYVAL pClientSite AS IOleClientSite
 , BYVAL pStg AS IStorage
 , BYREF ppvObj AS ANY
 ) AS LONG
DECLARE FUNCTION OleCreateLinkEx LIB "ole32.dll" ALIAS "OleCreateLinkEx" ( BYVAL pmkLinkSrc AS IMoniker
 , BYREF riid AS GUID
 , BYVAL dwFlags AS DWORD
 , BYVAL renderopt AS DWORD
 , BYVAL cFormats AS DWORD
 , BYREF rgAdvf AS DWORD
 , BYREF pFormatEtc AS FORMATETC
 , BYVAL lpAdviseSink AS IAdviseSink
 , BYREF rgdwConnection AS DWORD
 , BYVAL pClientSite AS IOleClientSite
 , BYVAL pStg AS IStorage
 , BYREF ppvObj AS ANY
 ) AS LONG
DECLARE FUNCTION OleCreateLinkToFile LIB "ole32.dll" ALIAS "OleCreateLinkToFile" ( BYREF lpszFileName AS WSTRINGZ
 , BYREF riid AS GUID
 , BYVAL renderopt AS DWORD
 , BYREF pFormatEtc AS FORMATETC
 , BYVAL pClientSite AS IOleClientSite
 , BYVAL pStg AS IStorage
 , BYREF ppvObj AS ANY
 ) AS LONG
DECLARE FUNCTION OleCreateLinkToFileEx LIB "ole32.dll" ALIAS "OleCreateLinkToFileEx" ( BYREF lpszFileName AS WSTRINGZ
 , BYREF riid AS GUID
 , BYVAL dwFlags AS DWORD
 , BYVAL renderopt AS DWORD
 , BYVAL cFormats AS DWORD
 , BYREF rgAdvf AS DWORD
 , BYREF rgFormatEtc AS FORMATETC
 , BYVAL pAdviseSink AS IAdviseSink
 , BYREF rgdwConnection AS DWORD
 , BYVAL pClientSite AS IOleClientSite
 , BYVAL pStg AS IStorage
 , BYREF ppvObj AS ANY
 ) AS LONG
DECLARE FUNCTION OleCreateFromFile LIB "ole32.dll" ALIAS "OleCreateFromFile" ( BYREF rclsid AS GUID
 , BYREF lpszFileName AS WSTRINGZ
 , BYREF riid AS GUID
 , BYVAL renderopt AS DWORD
 , BYREF pFormatEtc AS FORMATETC
 , BYVAL pClientSite AS IOleClientSite
 , BYVAL pStg AS IStorage
 , BYREF ppvObj AS ANY
 ) AS LONG
DECLARE FUNCTION OleCreateFromFileEx LIB "ole32.dll" ALIAS "OleCreateFromFileEx" ( BYREF rclsid AS GUID
 , BYREF lpszFileName AS WSTRINGZ
 , BYREF riid AS GUID
 , BYVAL dwFlags AS DWORD
 , BYVAL renderopt AS DWORD
 , BYVAL cFormats AS DWORD
 , BYREF rgAdvf AS DWORD
 , BYREF rgFormatEtc AS FORMATETC
 , BYVAL pAdviseSink AS IAdviseSink
 , BYREF rgdwConnection AS DWORD
 , BYVAL pClientSite AS IOleClientSite
 , BYVAL pStg AS IStorage
 , BYREF ppvObj AS ANY
 ) AS LONG
DECLARE FUNCTION OleLoad LIB "ole32.dll" ALIAS "OleLoad" ( BYVAL pStg AS IStorage
 , BYREF riid AS GUID
 , BYVAL pClientSite AS IOleClientSite
 , BYREF ppvObj AS ANY
 ) AS LONG
DECLARE FUNCTION OleSave LIB "ole32.dll" ALIAS "OleSave" ( BYVAL pPS AS IPersistStorage
 , BYVAL pStg AS IStorage
 , BYVAL fSameAsLoad AS LONG
 ) AS LONG
DECLARE FUNCTION OleLoadFromStream LIB "ole32.dll" ALIAS "OleLoadFromStream" ( BYVAL pStm AS IStream
 , BYREF iidInterface AS GUID
 , BYREF ppvObj AS ANY
 ) AS LONG
DECLARE FUNCTION OleSaveToStream LIB "ole32.dll" ALIAS "OleSaveToStream" ( BYVAL pPStm AS IPersistStream
 , BYVAL pStm AS IStream
 ) AS LONG
DECLARE FUNCTION OleSetContainedObject LIB "ole32.dll" ALIAS "OleSetContainedObject" ( BYVAL pUnk AS IUnknown
 , BYVAL fContained AS LONG
 ) AS LONG
DECLARE FUNCTION OleNoteObjectVisible LIB "ole32.dll" ALIAS "OleNoteObjectVisible" ( BYVAL pUnknown AS IUnknown
 , BYVAL fVisible AS LONG
 ) AS LONG
'/* Drag/Drop APIs */
DECLARE FUNCTION RegisterDragDrop LIB "ole32.dll" ALIAS "RegisterDragDrop" ( BYVAL hwnd AS QUAD , BYVAL pDropTarget As IDropTarget ) AS LONG
DECLARE FUNCTION RevokeDragDrop LIB "ole32.dll" ALIAS "RevokeDragDrop" ( BYVAL hwnd AS QUAD
 ) AS LONG
DECLARE FUNCTION DoDragDrop LIB "ole32.dll" ALIAS "DoDragDrop" ( BYVAL pDataObject AS IDataObject
 , BYVAL pDropSource AS IDropSource
 , BYVAL dwOKEffect AS DWORD
 , BYREF pdwEffect AS DWORD
 ) AS LONG
'/* Clipboard APIs */
DECLARE FUNCTION OleSetClipboard LIB "ole32.dll" ALIAS "OleSetClipboard" ( BYVAL pDataObj AS IDataObject ) AS LONG
DECLARE FUNCTION OleGetClipboard LIB "ole32.dll" ALIAS "OleGetClipboard" ( BYREF ppDataObj AS IDataObject
 ) AS LONG
DECLARE FUNCTION OleFlushClipboard LIB "ole32.dll" ALIAS "OleFlushClipboard" ( ) AS LONG
DECLARE FUNCTION OleIsCurrentClipboard LIB "ole32.dll" ALIAS "OleIsCurrentClipboard" ( BYVAL pDataObject AS IDataObject
 ) AS LONG
'/* InPlace Editing APIs */
DECLARE FUNCTION OleCreateMenuDescriptor LIB "ole32.dll" ALIAS "OleCreateMenuDescriptor" ( BYVAL hmenuCombined AS QUAD , BYREF lpMenuWidths AS OLEMENUGROUPWIDTHS ) AS QUAD ' HOLEMENU
DECLARE FUNCTION OleSetMenuDescriptor LIB "ole32.dll" ALIAS "OleSetMenuDescriptor" ( BYVAL holemenu AS QUAD , BYVAL hwndFrame AS QUAD , BYVAL hwndActiveObject AS QUAD , BYVAL lpFrame AS IOleInPlaceFrame , BYVAL lpActiveObj AS IOleInPlaceActiveObject ) AS LONG
DECLARE SUB OleDestroyMenuDescriptor LIB "ole32.dll" ALIAS "OleDestroyMenuDescriptor" ( BYVAL holemenu AS QUAD
 ) ' void
DECLARE FUNCTION OleTranslateAccelerator LIB "ole32.dll" ALIAS "OleTranslateAccelerator" ( BYVAL lpFrame AS IOleInPlaceFrame , BYVAL lpFrameInfo AS OLEINPLACEFRAMEINFO , BYREF lpmsg AS tagMsg ) AS LONG
'/* Helper APIs */
DECLARE FUNCTION OleDuplicateData LIB "ole32.dll" ALIAS "OleDuplicateData" ( BYVAL hSrc AS QUAD , BYVAL cfFormat AS QUAD , BYVAL uiFlags AS QUAD ) AS QUAD
DECLARE FUNCTION OleDraw LIB "ole32.dll" ALIAS "OleDraw" ( BYVAL pUnk AS IUnknown
 , BYVAL dwAspect AS DWORD
 , BYVAL hdcDraw AS DWORD
 , BYREF lprcBounds AS RECT
 ) AS LONG
DECLARE FUNCTION OleRun LIB "ole32.dll" ALIAS "OleRun" ( BYVAL pUnknown AS IUnknown
 ) AS LONG
DECLARE FUNCTION OleIsRunning LIB "ole32.dll" ALIAS "OleIsRunning" ( BYVAL pObject AS IOleObject
 ) AS LONG
DECLARE FUNCTION OleLockRunning LIB "ole32.dll" ALIAS "OleLockRunning" ( BYVAL pUnknown AS IUnknown
 , BYVAL fLock AS LONG
 , BYVAL fLastUnlockCloses AS LONG
 ) AS LONG
DECLARE SUB ReleaseStgMedium LIB "ole32.dll" ALIAS "ReleaseStgMedium" ( BYREF pmedium AS STGMEDIUM
 ) ' void
DECLARE FUNCTION CreateOleAdviseHolder LIB "ole32.dll" ALIAS "CreateOleAdviseHolder" ( BYREF ppOAHolder AS IOleAdviseHolder ) AS LONG
DECLARE FUNCTION OleCreateDefaultHandler LIB "ole32.dll" ALIAS "OleCreateDefaultHandler" ( BYREF clsid AS GUID
 , BYVAL pUnkOuter AS IUnknown
 , BYREF riid AS GUID
 , BYREF ppvObj AS ANY
 ) AS LONG
DECLARE FUNCTION OleCreateEmbeddingHelper LIB "ole32.dll" ALIAS "OleCreateEmbeddingHelper" ( BYREF clsid AS GUID
 , BYVAL pUnkOuter AS IUnknown
 , BYVAL flags AS DWORD
 , BYVAL pCF AS IClassFactory
 , BYREF riid AS GUID
 , BYREF ppvObj AS ANY
 ) AS LONG
DECLARE FUNCTION IsAccelerator LIB "ole32.dll" ALIAS "IsAccelerator" ( BYVAL hAccel AS DWORD
 , BYVAL cAccelEntries AS LONG
 , BYREF lpMsg AS tagMsg
 , BYREF lpwCmd AS WORD
 ) AS LONG
'/* Icon extraction Helper APIs */
DECLARE FUNCTION OleGetIconOfFile LIB "ole32.dll" ALIAS "OleGetIconOfFile" ( BYREF lpszPath AS WSTRINGZ , BYVAL fUseFileAsLabel AS LONG ) AS QUAD ' HGLOBAL
DECLARE FUNCTION OleGetIconOfClass LIB "ole32.dll" ALIAS "OleGetIconOfClass" ( BYREF rclsid AS GUID , BYREF lpszLabel AS WSTRINGZ , BYVAL fUseTypeAsLabel AS LONG ) AS QUAD ' HGLOBAL
DECLARE FUNCTION OleMetafilePictFromIconAndLabel LIB "ole32.dll" ALIAS "OleMetafilePictFromIconAndLabel" ( BYVAL hIcon AS QUAD , BYREF lpszLabel AS WSTRINGZ , BYREF lpszSourceFile AS WSTRINGZ , BYVAL iIconIndex AS QUAD ) AS QUAD ' HGLOBAL
'/* Registration Database Helper APIs */
DECLARE FUNCTION OleRegGetUserType LIB "ole32.dll" ALIAS "OleRegGetUserType" ( BYREF clsid AS GUID , BYVAL dwFormOfType AS QUAD , BYREF pszUserType AS QUAD ) AS LONG
DECLARE FUNCTION OleRegGetMiscStatus LIB "ole32.dll" ALIAS "OleRegGetMiscStatus" ( BYREF clsid AS GUID
 , BYVAL dwAspect AS DWORD
 , BYREF pdwStatus AS DWORD
 ) AS LONG
DECLARE FUNCTION OleRegEnumFormatEtc LIB "ole32.dll" ALIAS "OleRegEnumFormatEtc" ( BYREF clsid AS GUID
 , BYVAL dwDirection AS DWORD
 , BYREF ppenumFormatetc AS IEnumFORMATETC
 ) AS LONG
DECLARE FUNCTION OleRegEnumVerbs LIB "ole32.dll" ALIAS "OleRegEnumVerbs" ( BYREF clsid AS GUID
 , BYREF ppenumOleVerb AS IEnumOleVERB
 ) AS LONG
'/* OLE 1.0 conversion APIS */
'/***** OLE 1.0 OLESTREAM declarations *************************************/
'typedef struct _OLESTREAM FAR* LPOLESTREAM;
'typedef struct _OLESTREAMVTBL
'{
' DWORD (CALLBACK* Get)(LPOLESTREAM, void FAR*, DWORD);
' DWORD (CALLBACK* Put)(LPOLESTREAM, const void FAR*, DWORD);
'} OLESTREAMVTBL;
'typedef OLESTREAMVTBL FAR* LPOLESTREAMVTBL;
'typedef struct _OLESTREAM
'{
' LPOLESTREAMVTBL lpstbl;
'} OLESTREAM;
DECLARE FUNCTION OleConvertOLESTREAMToIStorage LIB "ole32.dll" ALIAS "OleConvertOLESTREAMToIStorage" ( BYREF lpolestream AS ANY , BYREF pstg AS IStorage , BYREF ptd AS DVTARGETDEVICE ) AS LONG
DECLARE FUNCTION OleConvertIStorageToOLESTREAM LIB "ole32.dll" ALIAS "OleConvertIStorageToOLESTREAM" ( BYVAL pStg AS IStorage
 , BYREF lpolestream AS ANY
 ) AS LONG
'/* Storage Utility APIs */
DECLARE FUNCTION GetHGlobalFromILockBytes LIB "ole32.dll" ALIAS "GetHGlobalFromILockBytes" ( BYVAL pLkbyt AS ILockBytes , BYREF phglobal AS QUAD ) AS LONG
DECLARE FUNCTION CreateILockBytesOnHGlobal LIB "ole32.dll" ALIAS "CreateILockBytesOnHGlobal" ( BYVAL hGlobal AS QUAD
 , BYVAL fDeleteOnRelease AS LONG
 , BYREF ppLkbyt AS ILockBytes
 ) AS LONG
DECLARE FUNCTION GetHGlobalFromStream LIB "ole32.dll" ALIAS "GetHGlobalFromStream" ( BYVAL pstm AS IStream
 , BYREF phglobal AS DWORD
 ) AS LONG
DECLARE FUNCTION CreateStreamOnHGlobal LIB "ole32.dll" ALIAS "CreateStreamOnHGlobal" ( BYVAL hGlobal AS DWORD
 , BYVAL fDeleteOnRelease AS LONG
 , BYREF ppstm AS IStream
 ) AS LONG
'/* ConvertTo APIS */
DECLARE FUNCTION OleDoAutoConvert LIB "ole32.dll" ALIAS "OleDoAutoConvert" ( BYVAL pStg AS IStorage , BYREF pClsidNew AS GUID ) AS LONG
DECLARE FUNCTION OleGetAutoConvert LIB "ole32.dll" ALIAS "OleGetAutoConvert" ( BYREF clsidOld AS GUID
 , BYREF pClsidNew AS GUID
 ) AS LONG
DECLARE FUNCTION OleSetAutoConvert LIB "ole32.dll" ALIAS "OleSetAutoConvert" ( BYREF clsidOld AS GUID
 , BYREF clsidNew AS GUID
 ) AS LONG
DECLARE FUNCTION GetConvertStg LIB "ole32.dll" ALIAS "GetConvertStg" ( BYVAL pStg AS IStorage
 ) AS LONG
DECLARE FUNCTION SetConvertStg LIB "ole32.dll" ALIAS "SetConvertStg" ( BYVAL pStg AS IStorage
 , BYVAL fConvert AS LONG
 ) AS LONG
DECLARE FUNCTION OleConvertIStorageToOLESTREAMEx LIB "ole32.dll" ALIAS "OleConvertIStorageToOLESTREAMEx" ( BYVAL pStg AS IStorage
 , BYVAL cfFormat AS DWORD
 , BYVAL lWidth AS LONG
 , BYVAL lHeight AS LONG
 , BYVAL dwSize AS DWORD
 , BYREF pmedium AS STGMEDIUM
 , BYREF lpolestm AS ANY
 ) AS LONG
DECLARE FUNCTION OleConvertOLESTREAMToIStorageEx LIB "ole32.dll" ALIAS "OleConvertOLESTREAMToIStorageEx" ( BYREF lpolestm AS ANY
 , BYREF pstg AS IStorage
 , BYREF pcfFormat AS DWORD
 , BYREF plWidth AS LONG
 , BYREF plHeight AS LONG
 , BYREF pdwSize AS DWORD
 , BYREF pmedium AS STGMEDIUM
 ) AS LONG
#ENDIF
