Include oleauto.h before oleidl.h, as per native headers.
[wine] / include / ole2.h
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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  */
20
21 #ifndef __WINE_OLE2_H
22 #define __WINE_OLE2_H
23
24 #include "windef.h"
25 #include "winerror.h"
26 #include "objbase.h"
27 #include "oleauto.h"
28 #define __WINE_INCLUDE_OLEIDL
29 #include "oleidl.h"
30 #undef __WINE_INCLUDE_OLEIDL
31
32 struct tagMSG;
33
34 #ifdef __cplusplus
35 extern "C" {
36 #endif /* defined(__cplusplus) */
37
38 #define E_DRAW                  VIEW_E_DRAW
39 #define DATA_E_FORMATETC        DV_E_FORMATETC
40
41 #define OLEIVERB_PRIMARY            (0L)
42 #define OLEIVERB_SHOW               (-1L)
43 #define OLEIVERB_OPEN               (-2L)
44 #define OLEIVERB_HIDE               (-3L)
45 #define OLEIVERB_UIACTIVATE         (-4L)
46 #define OLEIVERB_INPLACEACTIVATE    (-5L)
47 #define OLEIVERB_DISCARDUNDOSTATE   (-6L)
48 #define OLEIVERB_PROPERTIES         (-7L)
49
50 /*
51  * API declarations
52  */
53 HRESULT     WINAPI RegisterDragDrop(HWND,LPDROPTARGET);
54 HRESULT     WINAPI RevokeDragDrop(HWND);
55 HRESULT     WINAPI DoDragDrop(LPDATAOBJECT,LPDROPSOURCE,DWORD,DWORD*);
56 HRESULT  WINAPI OleLoadFromStream(IStream *pStm,REFIID iidInterface,void** ppvObj);
57 HRESULT  WINAPI OleSaveToStream(IPersistStream *pPStm,IStream *pStm);
58 HOLEMENU WINAPI OleCreateMenuDescriptor(HMENU hmenuCombined,LPOLEMENUGROUPWIDTHS lpMenuWidths);
59 HRESULT   WINAPI OleDestroyMenuDescriptor(HOLEMENU hmenuDescriptor);
60 HRESULT  WINAPI OleSetMenuDescriptor(HOLEMENU hmenuDescriptor,HWND hwndFrame,HWND hwndActiveObject,LPOLEINPLACEFRAME lpFrame,LPOLEINPLACEACTIVEOBJECT lpActiveObject);
61
62 HRESULT WINAPI ReadClassStg(IStorage *pstg,CLSID *pclsid);
63 HRESULT WINAPI WriteClassStm(IStream *pStm,REFCLSID rclsid);
64 HRESULT WINAPI ReadClassStm(IStream *pStm,CLSID *pclsid);
65
66
67 HRESULT     WINAPI OleSave(LPPERSISTSTORAGE pPS, LPSTORAGE pStg, BOOL fSameAsLoad);
68 HRESULT     WINAPI OleRegGetUserType(REFCLSID clsid,
69                                      DWORD dwFormOfType,
70                                      LPOLESTR* pszUserType);
71 HRESULT     WINAPI OleRegGetMiscStatus (REFCLSID clsid, DWORD dwAspect, DWORD* pdwStatus);
72 HRESULT     WINAPI OleRegEnumFormatEtc (REFCLSID clsid,
73                                         DWORD    dwDirection,
74                                         LPENUMFORMATETC* ppenumFormatetc);
75 HRESULT     WINAPI CreateStreamOnHGlobal (HGLOBAL hGlobal, BOOL fDeleteOnRelease, LPSTREAM* ppstm);
76 HRESULT     WINAPI GetHGlobalFromStream(LPSTREAM pstm, HGLOBAL* phglobal);
77 HRESULT     WINAPI OleRegEnumVerbs (REFCLSID clsid, LPENUMOLEVERB* ppenum);
78 BOOL        WINAPI OleIsRunning(LPOLEOBJECT pObject);
79 HRESULT     WINAPI OleCreateLinkFromData(LPDATAOBJECT pSrcDataObj, REFIID riid,
80                 DWORD renderopt, LPFORMATETC pFormatEtc,
81                 LPOLECLIENTSITE pClientSite, LPSTORAGE pStg,
82                 LPVOID* ppvObj);
83 HRESULT     WINAPI OleSetContainedObject(LPUNKNOWN pUnknown, BOOL fContained);
84 HRESULT     WINAPI OleQueryLinkFromData(IDataObject* pSrcDataObject);
85 HRESULT     WINAPI OleQueryCreateFromData(LPDATAOBJECT pSrcDataObject);
86 HRESULT     WINAPI OleRun(LPUNKNOWN pUnknown);
87 VOID        WINAPI ReleaseStgMedium(LPSTGMEDIUM);
88 HRESULT     WINAPI OleGetClipboard(IDataObject** ppDataObj);
89 HRESULT     WINAPI OleIsCurrentClipboard(LPDATAOBJECT);
90 HRESULT     WINAPI OleSetClipboard(LPDATAOBJECT);
91 HRESULT     WINAPI OleCreateStaticFromData(LPDATAOBJECT pSrcDataObj, REFIID iid,
92                 DWORD renderopt, LPFORMATETC pFormatEtc, LPOLECLIENTSITE pClientSite,
93                 LPSTORAGE pStg, LPVOID* ppvObj);
94 HRESULT     WINAPI ReadFmtUserTypeStg(LPSTORAGE pstg, CLIPFORMAT* pcf, LPOLESTR* lplpszUserType);
95 HRESULT     WINAPI OleLoad(LPSTORAGE pStg, REFIID riid, LPOLECLIENTSITE pClientSite, LPVOID* ppvObj);
96 HRESULT     WINAPI GetHGlobalFromILockBytes(LPLOCKBYTES plkbyt, HGLOBAL* phglobal);
97 HRESULT     WINAPI CreateILockBytesOnHGlobal(HGLOBAL hGlobal, BOOL fDeleteOnRelease, LPLOCKBYTES* pplkbyt);
98 HRESULT     WINAPI CreateDataAdviseHolder(LPDATAADVISEHOLDER* ppDAHolder);
99 HGLOBAL     WINAPI OleGetIconOfClass(REFCLSID rclsid, LPOLESTR lpszLabel, BOOL fUseTypeAsLabel);
100 HRESULT     WINAPI OleLockRunning(LPUNKNOWN pUnknown, BOOL fLock, BOOL fLastUnlockCloses);
101 HRESULT     WINAPI OleCreateFromFile(REFCLSID rclsid, LPCOLESTR lpszFileName, REFIID riid,
102                 DWORD renderopt, LPFORMATETC lpFormatEtc, LPOLECLIENTSITE pClientSite, LPSTORAGE pStg, LPVOID* ppvObj);
103 HRESULT     WINAPI OleCreateLink(LPMONIKER pmkLinkSrc, REFIID riid, DWORD renderopt, LPFORMATETC lpFormatEtc,
104                 LPOLECLIENTSITE pClientSite, LPSTORAGE pStg, LPVOID* ppvObj);
105 HRESULT     WINAPI OleCreate(REFCLSID rclsid, REFIID riid, DWORD renderopt, LPFORMATETC pFormatEtc, LPOLECLIENTSITE pClientSite,
106                 LPSTORAGE pStg, LPVOID* ppvObj);
107 HRESULT     WINAPI OleFlushClipboard(void);
108 HRESULT     WINAPI SetConvertStg(LPSTORAGE pStg, BOOL fConvert);
109 BOOL        WINAPI IsAccelerator(HACCEL hAccel, int cAccelEntries, struct tagMSG* lpMsg, WORD* lpwCmd);
110 HRESULT     WINAPI OleCreateLinkToFile(LPCOLESTR lpszFileName, REFIID riid, DWORD renderopt, LPFORMATETC lpFormatEtc,
111                 LPOLECLIENTSITE pClientSite, LPSTORAGE pStg, LPVOID* ppvObj);
112 HRESULT     WINAPI OleDuplicateData(HANDLE hSrc, CLIPFORMAT cfFormat, UINT uiFlags);
113 HRESULT     WINAPI WriteFmtUserTypeStg(LPSTORAGE pstg, CLIPFORMAT cf, LPOLESTR lpszUserType);
114 HRESULT     WINAPI OleTranslateAccelerator (LPOLEINPLACEFRAME lpFrame, LPOLEINPLACEFRAMEINFO lpFrameInfo, struct tagMSG* lpmsg);
115 HRESULT     WINAPI OleCreateFromData(LPDATAOBJECT pSrcDataObj, REFIID riid, DWORD renderopt, LPFORMATETC pFormatEtc,
116                 LPOLECLIENTSITE pClientSite, LPSTORAGE pStg, LPVOID* ppvObj);
117 HRESULT     WINAPI OleCreateDefaultHandler(REFCLSID  clsid,
118                                            LPUNKNOWN pUnkOuter,
119                                            REFIID    riid,
120                                            LPVOID*   ppvObj);
121 HRESULT     WINAPI CreateOleAdviseHolder (LPOLEADVISEHOLDER *ppOAHolder);
122 HRESULT     WINAPI OleInitialize(LPVOID pvReserved);
123 void        WINAPI OleUninitialize(void);
124 BOOL        WINAPI IsValidInterface(LPUNKNOWN punk);
125
126 /*
127  *  OLE version conversion declarations
128  */
129
130
131 typedef struct _OLESTREAM* LPOLESTREAM;
132 typedef struct _OLESTREAMVTBL {
133         DWORD   (CALLBACK *Get)(LPOLESTREAM,LPSTR,DWORD);
134         DWORD   (CALLBACK *Put)(LPOLESTREAM,LPSTR,DWORD);
135 } OLESTREAMVTBL;
136 typedef OLESTREAMVTBL*  LPOLESTREAMVTBL;
137 typedef struct _OLESTREAM {
138         LPOLESTREAMVTBL lpstbl;
139 } OLESTREAM;
140
141 HRESULT     WINAPI OleConvertOLESTREAMToIStorage( LPOLESTREAM lpolestream, LPSTORAGE pstg, const DVTARGETDEVICE* ptd);
142 HRESULT     WINAPI OleConvertIStorageToOLESTREAM( LPSTORAGE pstg, LPOLESTREAM lpolestream);
143
144 HRESULT     WINAPI OleGetAutoConvert( REFCLSID clsidOld, LPCLSID pClsidNew );
145 HRESULT     WINAPI OleSetAutoConvert( REFCLSID clsidOld, REFCLSID clsidNew );
146
147 #ifdef __cplusplus
148 } /* extern "C" */
149 #endif /* defined(__cplusplus) */
150
151 #endif  /* __WINE_OLE2_H */