Reactos
at master 170 lines 8.6 kB view raw
1/* 2 * Declarations for OLE2 3 * 4 * Copyright (C) the Wine project 5 * 6 * This library is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU Lesser General Public 8 * License as published by the Free Software Foundation; either 9 * version 2.1 of the License, or (at your option) any later version. 10 * 11 * This library is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 * Lesser General Public License for more details. 15 * 16 * You should have received a copy of the GNU Lesser General Public 17 * License along with this library; if not, write to the Free Software 18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA 19 */ 20 21#ifndef __WINE_OLE2_H 22#define __WINE_OLE2_H 23 24#include <winerror.h> 25#include <objbase.h> 26#include <oleauto.h> 27#include <oleidl.h> 28 29struct tagMSG; 30 31#ifdef __cplusplus 32extern "C" { 33#endif /* defined(__cplusplus) */ 34 35#define E_DRAW VIEW_E_DRAW 36#define DATA_E_FORMATETC DV_E_FORMATETC 37 38#define OLEIVERB_PRIMARY (0L) 39#define OLEIVERB_SHOW (-1L) 40#define OLEIVERB_OPEN (-2L) 41#define OLEIVERB_HIDE (-3L) 42#define OLEIVERB_UIACTIVATE (-4L) 43#define OLEIVERB_INPLACEACTIVATE (-5L) 44#define OLEIVERB_DISCARDUNDOSTATE (-6L) 45#define OLEIVERB_PROPERTIES (-7L) 46 47#define EMBDHLP_INPROC_HANDLER 0x00000000 48#define EMBDHLP_INPROC_SERVER 0x00000001 49#define EMBDHLP_CREATENOW 0x00000000 50#define EMBDHLP_DELAYCREATE 0x00010000 51 52/* 53 * API declarations 54 */ 55HRESULT WINAPI RegisterDragDrop(HWND,LPDROPTARGET); 56HRESULT WINAPI RevokeDragDrop(HWND); 57HRESULT WINAPI DoDragDrop(LPDATAOBJECT,LPDROPSOURCE,DWORD,DWORD*); 58HRESULT WINAPI OleLoadFromStream(IStream *pStm,REFIID iidInterface,void** ppvObj); 59HRESULT WINAPI OleSaveToStream(IPersistStream *pPStm,IStream *pStm); 60HOLEMENU WINAPI OleCreateMenuDescriptor(HMENU hmenuCombined,LPOLEMENUGROUPWIDTHS lpMenuWidths); 61HRESULT WINAPI OleDestroyMenuDescriptor(HOLEMENU hmenuDescriptor); 62HRESULT WINAPI OleSetMenuDescriptor(HOLEMENU hmenuDescriptor,HWND hwndFrame,HWND hwndActiveObject,LPOLEINPLACEFRAME lpFrame,LPOLEINPLACEACTIVEOBJECT lpActiveObject); 63 64HRESULT WINAPI WriteClassStg(IStorage *pstg, REFCLSID rclsid); 65HRESULT WINAPI ReadClassStg(IStorage *pstg,CLSID *pclsid); 66HRESULT WINAPI WriteClassStm(IStream *pStm,REFCLSID rclsid); 67HRESULT WINAPI ReadClassStm(IStream *pStm,CLSID *pclsid); 68 69 70HRESULT WINAPI OleSave(LPPERSISTSTORAGE pPS, LPSTORAGE pStg, BOOL fSameAsLoad); 71HRESULT WINAPI OleRegGetUserType(REFCLSID clsid, 72 DWORD dwFormOfType, 73 LPOLESTR* pszUserType); 74HRESULT WINAPI OleRegGetMiscStatus (REFCLSID clsid, DWORD dwAspect, DWORD* pdwStatus); 75HRESULT WINAPI OleRegEnumFormatEtc (REFCLSID clsid, 76 DWORD dwDirection, 77 LPENUMFORMATETC* ppenumFormatetc); 78HRESULT WINAPI CreateStreamOnHGlobal (HGLOBAL hGlobal, BOOL fDeleteOnRelease, LPSTREAM* ppstm); 79HRESULT WINAPI GetHGlobalFromStream(LPSTREAM pstm, HGLOBAL* phglobal); 80HRESULT WINAPI OleRegEnumVerbs (REFCLSID clsid, LPENUMOLEVERB* ppenum); 81BOOL WINAPI OleIsRunning(LPOLEOBJECT pObject); 82HRESULT WINAPI OleCreateLinkFromData(LPDATAOBJECT pSrcDataObj, REFIID riid, 83 DWORD renderopt, LPFORMATETC pFormatEtc, 84 LPOLECLIENTSITE pClientSite, LPSTORAGE pStg, 85 LPVOID* ppvObj); 86HRESULT WINAPI OleSetContainedObject(LPUNKNOWN pUnknown, BOOL fContained); 87HRESULT WINAPI OleNoteObjectVisible(LPUNKNOWN pUnknown, BOOL fVisible); 88HRESULT WINAPI OleQueryLinkFromData(IDataObject* pSrcDataObject); 89HRESULT WINAPI OleQueryCreateFromData(LPDATAOBJECT pSrcDataObject); 90HRESULT WINAPI OleRun(LPUNKNOWN pUnknown); 91HRESULT WINAPI OleDraw(LPUNKNOWN pUnknown, DWORD dwAspect, HDC hdcDraw, LPCRECT lprcBounds); 92VOID WINAPI ReleaseStgMedium(LPSTGMEDIUM); 93HRESULT WINAPI OleGetClipboard(IDataObject** ppDataObj); 94HRESULT WINAPI OleIsCurrentClipboard(LPDATAOBJECT); 95HRESULT WINAPI OleSetClipboard(LPDATAOBJECT); 96HRESULT WINAPI OleCreateStaticFromData(LPDATAOBJECT pSrcDataObj, REFIID iid, 97 DWORD renderopt, LPFORMATETC pFormatEtc, LPOLECLIENTSITE pClientSite, 98 LPSTORAGE pStg, LPVOID* ppvObj); 99HRESULT WINAPI ReadFmtUserTypeStg(LPSTORAGE pstg, CLIPFORMAT* pcf, LPOLESTR* lplpszUserType); 100HRESULT WINAPI OleLoad(LPSTORAGE pStg, REFIID riid, LPOLECLIENTSITE pClientSite, LPVOID* ppvObj); 101HRESULT WINAPI GetHGlobalFromILockBytes(LPLOCKBYTES plkbyt, HGLOBAL* phglobal); 102HRESULT WINAPI CreateILockBytesOnHGlobal(HGLOBAL hGlobal, BOOL fDeleteOnRelease, LPLOCKBYTES* pplkbyt); 103HRESULT WINAPI CreateDataAdviseHolder(LPDATAADVISEHOLDER* ppDAHolder); 104HGLOBAL WINAPI OleGetIconOfClass(REFCLSID rclsid, LPOLESTR lpszLabel, BOOL fUseTypeAsLabel); 105HGLOBAL WINAPI OleGetIconOfFile(LPOLESTR lpszPath, BOOL fUseFileAsLabel); 106HGLOBAL WINAPI OleMetafilePictFromIconAndLabel(HICON hIcon, LPOLESTR lpszLabel, LPOLESTR lpszSourceFile, UINT iIconIndex); 107HRESULT WINAPI OleLockRunning(LPUNKNOWN pUnknown, BOOL fLock, BOOL fLastUnlockCloses); 108HRESULT WINAPI OleCreateFromFile(REFCLSID rclsid, LPCOLESTR lpszFileName, REFIID riid, 109 DWORD renderopt, LPFORMATETC lpFormatEtc, LPOLECLIENTSITE pClientSite, LPSTORAGE pStg, LPVOID* ppvObj); 110HRESULT WINAPI OleCreateLink(LPMONIKER pmkLinkSrc, REFIID riid, DWORD renderopt, LPFORMATETC lpFormatEtc, 111 LPOLECLIENTSITE pClientSite, LPSTORAGE pStg, LPVOID* ppvObj); 112HRESULT WINAPI OleCreate(REFCLSID rclsid, REFIID riid, DWORD renderopt, LPFORMATETC pFormatEtc, LPOLECLIENTSITE pClientSite, 113 LPSTORAGE pStg, LPVOID* ppvObj); 114HRESULT WINAPI OleFlushClipboard(void); 115HRESULT WINAPI GetConvertStg(LPSTORAGE pStg); 116HRESULT WINAPI SetConvertStg(LPSTORAGE pStg, BOOL fConvert); 117BOOL WINAPI IsAccelerator(HACCEL hAccel, int cAccelEntries, struct tagMSG* lpMsg, WORD* lpwCmd); 118HRESULT WINAPI OleCreateLinkToFile(LPCOLESTR lpszFileName, REFIID riid, DWORD renderopt, LPFORMATETC lpFormatEtc, 119 LPOLECLIENTSITE pClientSite, LPSTORAGE pStg, LPVOID* ppvObj); 120HANDLE WINAPI OleDuplicateData(HANDLE hSrc, CLIPFORMAT cfFormat, UINT uiFlags); 121HRESULT WINAPI WriteFmtUserTypeStg(LPSTORAGE pstg, CLIPFORMAT cf, LPOLESTR lpszUserType); 122HRESULT WINAPI OleTranslateAccelerator (LPOLEINPLACEFRAME lpFrame, LPOLEINPLACEFRAMEINFO lpFrameInfo, struct tagMSG* lpmsg); 123HRESULT WINAPI OleCreateFromData(LPDATAOBJECT pSrcDataObj, REFIID riid, DWORD renderopt, LPFORMATETC pFormatEtc, 124 LPOLECLIENTSITE pClientSite, LPSTORAGE pStg, LPVOID* ppvObj); 125HRESULT WINAPI OleCreateFromDataEx(LPDATAOBJECT pSrcDataObj, REFIID riid, DWORD dwFlags, DWORD renderopt, ULONG num_formats, 126 DWORD *adv_flags, LPFORMATETC fmts, IAdviseSink *sink, DWORD *conns, 127 LPOLECLIENTSITE pClientSite, LPSTORAGE pStg, LPVOID* ppvObj); 128HRESULT WINAPI OleCreateDefaultHandler(REFCLSID clsid, 129 LPUNKNOWN pUnkOuter, 130 REFIID riid, 131 LPVOID* ppvObj); 132HRESULT WINAPI OleCreateEmbeddingHelper(REFCLSID clsid, 133 LPUNKNOWN pUnkOuter, 134 DWORD flags, 135 IClassFactory *pCF, 136 REFIID riid, 137 LPVOID* ppvObj); 138HRESULT WINAPI CreateOleAdviseHolder (LPOLEADVISEHOLDER *ppOAHolder); 139HRESULT WINAPI OleInitialize(LPVOID pvReserved); 140void WINAPI OleUninitialize(void); 141BOOL WINAPI IsValidInterface(LPUNKNOWN punk); 142DWORD WINAPI OleBuildVersion(VOID); 143 144/* 145 * OLE version conversion declarations 146 */ 147 148 149typedef struct _OLESTREAM* LPOLESTREAM; 150typedef struct _OLESTREAMVTBL { 151 DWORD (CALLBACK *Get)(LPOLESTREAM,LPSTR,DWORD); 152 DWORD (CALLBACK *Put)(LPOLESTREAM,LPSTR,DWORD); 153} OLESTREAMVTBL; 154typedef OLESTREAMVTBL* LPOLESTREAMVTBL; 155typedef struct _OLESTREAM { 156 LPOLESTREAMVTBL lpstbl; 157} OLESTREAM; 158 159HRESULT WINAPI OleConvertOLESTREAMToIStorage( LPOLESTREAM lpolestream, LPSTORAGE pstg, const DVTARGETDEVICE* ptd); 160HRESULT WINAPI OleConvertIStorageToOLESTREAM( LPSTORAGE pstg, LPOLESTREAM lpolestream); 161 162HRESULT WINAPI OleDoAutoConvert( LPSTORAGE pStg, LPCLSID pClsidNew ); 163HRESULT WINAPI OleGetAutoConvert( REFCLSID clsidOld, LPCLSID pClsidNew ); 164HRESULT WINAPI OleSetAutoConvert( REFCLSID clsidOld, REFCLSID clsidNew ); 165 166#ifdef __cplusplus 167} /* extern "C" */ 168#endif /* defined(__cplusplus) */ 169 170#endif /* __WINE_OLE2_H */