ReactOS  0.4.13-dev-249-gcba1a2f
ole2.h
Go to the documentation of this file.
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 
29 struct tagMSG;
30 
31 #ifdef __cplusplus
32 extern "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  */
55 HRESULT WINAPI RegisterDragDrop(HWND,LPDROPTARGET);
58 HRESULT WINAPI OleLoadFromStream(IStream *pStm,REFIID iidInterface,void** ppvObj);
60 HOLEMENU WINAPI OleCreateMenuDescriptor(HMENU hmenuCombined,LPOLEMENUGROUPWIDTHS lpMenuWidths);
61 HRESULT WINAPI OleDestroyMenuDescriptor(HOLEMENU hmenuDescriptor);
62 HRESULT WINAPI OleSetMenuDescriptor(HOLEMENU hmenuDescriptor,HWND hwndFrame,HWND hwndActiveObject,LPOLEINPLACEFRAME lpFrame,LPOLEINPLACEACTIVEOBJECT lpActiveObject);
63 
67 HRESULT WINAPI ReadClassStm(IStream *pStm,CLSID *pclsid);
68 
69 
70 HRESULT WINAPI OleSave(LPPERSISTSTORAGE pPS, LPSTORAGE pStg, BOOL fSameAsLoad);
72  DWORD dwFormOfType,
73  LPOLESTR* pszUserType);
76  DWORD dwDirection,
77  LPENUMFORMATETC* ppenumFormatetc);
78 HRESULT WINAPI CreateStreamOnHGlobal (HGLOBAL hGlobal, BOOL fDeleteOnRelease, LPSTREAM* ppstm);
80 HRESULT WINAPI OleRegEnumVerbs (REFCLSID clsid, LPENUMOLEVERB* ppenum);
83  DWORD renderopt, LPFORMATETC pFormatEtc,
84  LPOLECLIENTSITE pClientSite, LPSTORAGE pStg,
85  LPVOID* ppvObj);
91 HRESULT WINAPI OleDraw(LPUNKNOWN pUnknown, DWORD dwAspect, HDC hdcDraw, LPCRECT lprcBounds);
92 VOID WINAPI ReleaseStgMedium(LPSTGMEDIUM);
97  DWORD renderopt, LPFORMATETC pFormatEtc, LPOLECLIENTSITE pClientSite,
98  LPSTORAGE pStg, LPVOID* ppvObj);
99 HRESULT WINAPI ReadFmtUserTypeStg(LPSTORAGE pstg, CLIPFORMAT* pcf, LPOLESTR* lplpszUserType);
100 HRESULT WINAPI OleLoad(LPSTORAGE pStg, REFIID riid, LPOLECLIENTSITE pClientSite, LPVOID* ppvObj);
102 HRESULT WINAPI CreateILockBytesOnHGlobal(HGLOBAL hGlobal, BOOL fDeleteOnRelease, LPLOCKBYTES* pplkbyt);
104 HGLOBAL WINAPI OleGetIconOfClass(REFCLSID rclsid, LPOLESTR lpszLabel, BOOL fUseTypeAsLabel);
105 HGLOBAL WINAPI OleGetIconOfFile(LPOLESTR lpszPath, BOOL fUseFileAsLabel);
106 HGLOBAL WINAPI OleMetafilePictFromIconAndLabel(HICON hIcon, LPOLESTR lpszLabel, LPOLESTR lpszSourceFile, UINT iIconIndex);
107 HRESULT WINAPI OleLockRunning(LPUNKNOWN pUnknown, BOOL fLock, BOOL fLastUnlockCloses);
108 HRESULT WINAPI OleCreateFromFile(REFCLSID rclsid, LPCOLESTR lpszFileName, REFIID riid,
109  DWORD renderopt, LPFORMATETC lpFormatEtc, LPOLECLIENTSITE pClientSite, LPSTORAGE pStg, LPVOID* ppvObj);
110 HRESULT WINAPI OleCreateLink(LPMONIKER pmkLinkSrc, REFIID riid, DWORD renderopt, LPFORMATETC lpFormatEtc,
111  LPOLECLIENTSITE pClientSite, LPSTORAGE pStg, LPVOID* ppvObj);
112 HRESULT WINAPI OleCreate(REFCLSID rclsid, REFIID riid, DWORD renderopt, LPFORMATETC pFormatEtc, LPOLECLIENTSITE pClientSite,
113  LPSTORAGE pStg, LPVOID* ppvObj);
116 HRESULT WINAPI SetConvertStg(LPSTORAGE pStg, BOOL fConvert);
117 BOOL WINAPI IsAccelerator(HACCEL hAccel, int cAccelEntries, struct tagMSG* lpMsg, WORD* lpwCmd);
118 HRESULT WINAPI OleCreateLinkToFile(LPCOLESTR lpszFileName, REFIID riid, DWORD renderopt, LPFORMATETC lpFormatEtc,
119  LPOLECLIENTSITE pClientSite, LPSTORAGE pStg, LPVOID* ppvObj);
120 HANDLE WINAPI OleDuplicateData(HANDLE hSrc, CLIPFORMAT cfFormat, UINT uiFlags);
121 HRESULT WINAPI WriteFmtUserTypeStg(LPSTORAGE pstg, CLIPFORMAT cf, LPOLESTR lpszUserType);
122 HRESULT WINAPI OleTranslateAccelerator (LPOLEINPLACEFRAME lpFrame, LPOLEINPLACEFRAMEINFO lpFrameInfo, struct tagMSG* lpmsg);
123 HRESULT WINAPI OleCreateFromData(LPDATAOBJECT pSrcDataObj, REFIID riid, DWORD renderopt, LPFORMATETC pFormatEtc,
124  LPOLECLIENTSITE pClientSite, LPSTORAGE pStg, LPVOID* ppvObj);
125 HRESULT 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);
129  LPUNKNOWN pUnkOuter,
130  REFIID riid,
131  LPVOID* ppvObj);
133  LPUNKNOWN pUnkOuter,
134  DWORD flags,
135  IClassFactory *pCF,
136  REFIID riid,
137  LPVOID* ppvObj);
138 HRESULT WINAPI CreateOleAdviseHolder (LPOLEADVISEHOLDER *ppOAHolder);
140 void WINAPI OleUninitialize(void);
143 
144 /*
145  * OLE version conversion declarations
146  */
147 
148 
149 typedef struct _OLESTREAM* LPOLESTREAM;
150 typedef struct _OLESTREAMVTBL {
153 } OLESTREAMVTBL;
155 typedef struct _OLESTREAM {
157 } OLESTREAM;
158 
159 HRESULT WINAPI OleConvertOLESTREAMToIStorage( LPOLESTREAM lpolestream, LPSTORAGE pstg, const DVTARGETDEVICE* ptd);
161 
164 HRESULT WINAPI OleSetAutoConvert( REFCLSID clsidOld, REFCLSID clsidNew );
165 
166 #ifdef __cplusplus
167 } /* extern "C" */
168 #endif /* defined(__cplusplus) */
169 
170 #endif /* __WINE_OLE2_H */
HRESULT WINAPI OleSave(LPPERSISTSTORAGE pPS, LPSTORAGE pStg, BOOL fSameAsLoad)
Definition: ole2.c:1341
interface IStorage * LPSTORAGE
Definition: objfwd.h:30
DWORD WINAPI OleBuildVersion(VOID)
Definition: ole2.c:163
interface ILockBytes * LPLOCKBYTES
Definition: objfwd.h:32
static LPCLSID pClsidNew
Definition: compobj.c:71
struct _OLESTREAMVTBL OLESTREAMVTBL
static HICON
Definition: imagelist.c:84
#define REFIID
Definition: guiddef.h:113
HRESULT WINAPI WriteClassStm(IStream *pStm, REFCLSID rclsid)
Definition: storage32.c:9526
interface IDataAdviseHolder * LPDATAADVISEHOLDER
Definition: objfwd.h:22
HRESULT WINAPI SetConvertStg(LPSTORAGE pStg, BOOL fConvert)
REFIID riid
Definition: precomp.h:44
#define REFCLSID
Definition: guiddef.h:112
HRESULT WINAPI DoDragDrop(LPDATAOBJECT, LPDROPSOURCE, DWORD, DWORD *)
static HDC
Definition: imagelist.c:92
HRESULT WINAPI CreateILockBytesOnHGlobal(HGLOBAL hGlobal, BOOL fDeleteOnRelease, LPLOCKBYTES *pplkbyt)
#define CALLBACK
Definition: compat.h:27
HRESULT WINAPI OleSetMenuDescriptor(HOLEMENU hmenuDescriptor, HWND hwndFrame, HWND hwndActiveObject, LPOLEINPLACEFRAME lpFrame, LPOLEINPLACEACTIVEOBJECT lpActiveObject)
Definition: ole2.c:1878
HOLEMENU WINAPI OleCreateMenuDescriptor(HMENU hmenuCombined, LPOLEMENUGROUPWIDTHS lpMenuWidths)
Definition: ole2.c:1815
HRESULT WINAPI OleNoteObjectVisible(LPUNKNOWN pUnknown, BOOL fVisible)
Definition: ole2.c:2842
HRESULT WINAPI RegisterDragDrop(HWND, LPDROPTARGET)
Definition: ole2.c:560
interface IStream * LPSTREAM
Definition: objfwd.h:10
HRESULT WINAPI OleCreateFromDataEx(LPDATAOBJECT pSrcDataObj, REFIID riid, DWORD dwFlags, DWORD renderopt, ULONG num_formats, DWORD *adv_flags, LPFORMATETC fmts, IAdviseSink *sink, DWORD *conns, LPOLECLIENTSITE pClientSite, LPSTORAGE pStg, LPVOID *ppvObj)
void WINAPI OleUninitialize(void)
Definition: ole2.c:233
static LPOLESTR
Definition: stg_prop.c:27
HRESULT WINAPI WriteClassStg(IStorage *pstg, REFCLSID rclsid)
Definition: storage32.c:9079
HRESULT WINAPI OleGetAutoConvert(REFCLSID clsidOld, LPCLSID pClsidNew)
Definition: ole2.c:2707
struct _OLESTREAM OLESTREAM
GLsizei GLenum GLboolean sink
Definition: glext.h:5672
HRESULT WINAPI OleCreateLink(LPMONIKER pmkLinkSrc, REFIID riid, DWORD renderopt, LPFORMATETC lpFormatEtc, LPOLECLIENTSITE pClientSite, LPSTORAGE pStg, LPVOID *ppvObj)
Definition: ole2stubs.c:49
HRESULT WINAPI GetConvertStg(LPSTORAGE pStg)
HRESULT WINAPI OleCreateEmbeddingHelper(REFCLSID clsid, LPUNKNOWN pUnkOuter, DWORD flags, IClassFactory *pCF, REFIID riid, LPVOID *ppvObj)
HRESULT WINAPI OleCreateStaticFromData(LPDATAOBJECT pSrcDataObj, REFIID iid, DWORD renderopt, LPFORMATETC pFormatEtc, LPOLECLIENTSITE pClientSite, LPSTORAGE pStg, LPVOID *ppvObj)
HRESULT WINAPI OleLoadFromStream(IStream *pStm, REFIID iidInterface, void **ppvObj)
Definition: storage32.c:9130
HRESULT WINAPI ReadClassStg(IStorage *pstg, CLSID *pclsid)
Definition: storage32.c:9104
HRESULT WINAPI OleCreateLinkToFile(LPCOLESTR lpszFileName, REFIID riid, DWORD renderopt, LPFORMATETC lpFormatEtc, LPOLECLIENTSITE pClientSite, LPSTORAGE pStg, LPVOID *ppvObj)
Definition: ole2stubs.c:38
HRESULT WINAPI OleSetAutoConvert(REFCLSID clsidOld, REFCLSID clsidNew)
Definition: ole2.c:2734
HRESULT WINAPI OleIsCurrentClipboard(LPDATAOBJECT)
HRESULT WINAPI OleConvertIStorageToOLESTREAM(LPSTORAGE pstg, LPOLESTREAM lpolestream)
Definition: storage32.c:10552
HRESULT WINAPI OleDoAutoConvert(LPSTORAGE pStg, LPCLSID pClsidNew)
Definition: ole2.c:2761
HRESULT WINAPI ReadFmtUserTypeStg(LPSTORAGE pstg, CLIPFORMAT *pcf, LPOLESTR *lplpszUserType)
Definition: storage32.c:9400
HACCEL hAccel
Definition: main.c:47
unsigned int BOOL
Definition: ntddk_ex.h:94
HRESULT WINAPI RevokeDragDrop(HWND)
Definition: ole2.c:642
HRESULT WINAPI OleRegEnumVerbs(REFCLSID clsid, LPENUMOLEVERB *ppenum)
Definition: ole2.c:1128
HRESULT WINAPI WriteFmtUserTypeStg(LPSTORAGE pstg, CLIPFORMAT cf, LPOLESTR lpszUserType)
Definition: storage32.c:9357
HRESULT WINAPI OleQueryCreateFromData(LPDATAOBJECT pSrcDataObject)
HGLOBAL WINAPI OleMetafilePictFromIconAndLabel(HICON hIcon, LPOLESTR lpszLabel, LPOLESTR lpszSourceFile, UINT iIconIndex)
Definition: ole32_main.c:43
static LPUNKNOWN
Definition: ndr_ole.c:49
struct _OLESTREAM * LPOLESTREAM
Definition: ole2.h:149
static struct fmt fmts[]
HANDLE WINAPI OleDuplicateData(HANDLE hSrc, CLIPFORMAT cfFormat, UINT uiFlags)
Definition: ole2impl.c:425
HRESULT WINAPI OleQueryLinkFromData(IDataObject *pSrcDataObject)
Definition: ole2.c:857
OLESTREAMVTBL * LPOLESTREAMVTBL
Definition: ole2.h:154
HRESULT WINAPI OleCreate(REFCLSID rclsid, REFIID riid, DWORD renderopt, LPFORMATETC pFormatEtc, LPOLECLIENTSITE pClientSite, LPSTORAGE pStg, LPVOID *ppvObj)
Definition: ole2.c:2612
HRESULT WINAPI OleSaveToStream(IPersistStream *pPStm, IStream *pStm)
Definition: storage32.c:9165
interface IPersistStorage * LPPERSISTSTORAGE
Definition: objfwd.h:31
HRESULT WINAPI OleRegEnumFormatEtc(REFCLSID clsid, DWORD dwDirection, LPENUMFORMATETC *ppenumFormatetc)
Definition: ole2stubs.c:77
_In_ PUNKNOWN pUnknown
Definition: drmk.h:76
HRESULT WINAPI OleDestroyMenuDescriptor(HOLEMENU hmenuDescriptor)
Definition: ole2.c:1850
LONG HRESULT
Definition: typedefs.h:77
HRESULT WINAPI CreateOleAdviseHolder(LPOLEADVISEHOLDER *ppOAHolder)
static LPCSTR DWORD void * pvReserved
Definition: str.c:196
HGLOBAL WINAPI OleGetIconOfFile(LPOLESTR lpszPath, BOOL fUseFileAsLabel)
Definition: ole2stubs.c:68
#define WINAPI
Definition: msvc.h:8
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned long DWORD
Definition: ntddk_ex.h:95
HRESULT WINAPI OleSetClipboard(LPDATAOBJECT)
HGLOBAL WINAPI OleGetIconOfClass(REFCLSID rclsid, LPOLESTR lpszLabel, BOOL fUseTypeAsLabel)
Definition: ole2stubs.c:59
HRESULT WINAPI OleLoad(LPSTORAGE pStg, REFIID riid, LPOLECLIENTSITE pClientSite, LPVOID *ppvObj)
Definition: ole2.c:1227
GLbitfield flags
Definition: glext.h:7161
HRESULT WINAPI OleRun(LPUNKNOWN pUnknown)
Definition: ole2.c:1208
BOOL WINAPI IsValidInterface(LPUNKNOWN punk)
Definition: ifs.c:535
interface IEnumFORMATETC * LPENUMFORMATETC
Definition: objfwd.h:24
HRESULT WINAPI GetHGlobalFromStream(LPSTREAM pstm, HGLOBAL *phglobal)
REFCLSID clsid
Definition: msctf.c:84
HRESULT WINAPI OleFlushClipboard(void)
Definition: clipboard.c:2293
HRESULT WINAPI CreateDataAdviseHolder(LPDATAADVISEHOLDER *ppDAHolder)
void DWORD
Definition: ole.h:202
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
HRESULT WINAPI OleConvertOLESTREAMToIStorage(LPOLESTREAM lpolestream, LPSTORAGE pstg, const DVTARGETDEVICE *ptd)
Definition: storage32.c:10461
HRESULT WINAPI GetHGlobalFromILockBytes(LPLOCKBYTES plkbyt, HGLOBAL *phglobal)
interface IDataObject * LPDATAOBJECT
Definition: objfwd.h:21
HRESULT WINAPI OleCreateFromFile(REFCLSID rclsid, LPCOLESTR lpszFileName, REFIID riid, DWORD renderopt, LPFORMATETC lpFormatEtc, LPOLECLIENTSITE pClientSite, LPSTORAGE pStg, LPVOID *ppvObj)
interface IMoniker * LPMONIKER
Definition: objfwd.h:9
HRESULT WINAPI OleInitialize(LPVOID pvReserved)
Definition: ole2.c:172
LPOLESTREAMVTBL lpstbl
Definition: ole.h:206
HRESULT WINAPI OleCreateDefaultHandler(REFCLSID clsid, LPUNKNOWN pUnkOuter, REFIID riid, LPVOID *ppvObj)
VOID WINAPI ReleaseStgMedium(LPSTGMEDIUM)
HICON hIcon
Definition: msconfig.c:44
HRESULT WINAPI OleRegGetMiscStatus(REFCLSID clsid, DWORD dwAspect, DWORD *pdwStatus)
Definition: ole2.c:867
HRESULT WINAPI OleCreateLinkFromData(LPDATAOBJECT pSrcDataObj, REFIID riid, DWORD renderopt, LPFORMATETC pFormatEtc, LPOLECLIENTSITE pClientSite, LPSTORAGE pStg, LPVOID *ppvObj)
HRESULT WINAPI OleGetClipboard(IDataObject **ppDataObj)
Definition: clipboard.c:2249
unsigned int UINT
Definition: ndis.h:50
BOOL WINAPI OleIsRunning(LPOLEOBJECT pObject)
Definition: ole2.c:2821
HRESULT WINAPI ReadClassStm(IStream *pStm, CLSID *pclsid)
Definition: storage32.c:9549
HRESULT WINAPI OleSetContainedObject(LPUNKNOWN pUnknown, BOOL fContained)
Definition: ole2.c:1171
unsigned int ULONG
Definition: retypes.h:1
STDMETHOD() Get(THIS_ IN REFGUID PropSet, IN ULONG Id, IN LPVOID InstanceData, IN ULONG InstanceLength, OUT LPVOID PropertyData, IN ULONG DataLength, OUT ULONG *BytesReturned) PURE
HRESULT WINAPI OleTranslateAccelerator(LPOLEINPLACEFRAME lpFrame, LPOLEINPLACEFRAMEINFO lpFrameInfo, struct tagMSG *lpmsg)
BOOL WINAPI IsAccelerator(HACCEL hAccel, int cAccelEntries, struct tagMSG *lpMsg, WORD *lpwCmd)
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
HRESULT WINAPI OleRegGetUserType(REFCLSID clsid, DWORD dwFormOfType, LPOLESTR *pszUserType)
Definition: ole2.c:681
HRESULT WINAPI CreateStreamOnHGlobal(HGLOBAL hGlobal, BOOL fDeleteOnRelease, LPSTREAM *ppstm)
HRESULT WINAPI OleDraw(LPUNKNOWN pUnknown, DWORD dwAspect, HDC hdcDraw, LPCRECT lprcBounds)
HRESULT WINAPI OleLockRunning(LPUNKNOWN pUnknown, BOOL fLock, BOOL fLastUnlockCloses)
Definition: ole2.c:1380
HRESULT WINAPI OleCreateFromData(LPDATAOBJECT pSrcDataObj, REFIID riid, DWORD renderopt, LPFORMATETC pFormatEtc, LPOLECLIENTSITE pClientSite, LPSTORAGE pStg, LPVOID *ppvObj)
Definition: ole2impl.c:203