Fixed some issues found by winapi_check.
[wine.git] / include / ole2.h
blob6bed8ee17c28b341bb97891fafcf4b7c37f74fc6
1 /*
2 * Declarations for OLE2
4 * Copyright (C) the Wine project
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.
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.
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
21 #ifndef __WINE_OLE2_H
22 #define __WINE_OLE2_H
24 #include "windef.h"
25 #include "winerror.h"
26 #include "objbase.h"
27 #include "wine/obj_base.h"
28 #include "wine/obj_misc.h"
29 #include "wine/obj_storage.h"
30 #include "wine/obj_moniker.h"
31 #include "wine/obj_dataobject.h"
32 #include "wine/obj_dragdrop.h"
33 #include "wine/obj_inplace.h"
34 #include "wine/obj_oleobj.h"
35 #include "wine/obj_oleview.h"
36 #ifndef __WINE__
37 #include "oleidl.h"
38 #include "oleauto.h"
39 #endif
40 struct tagMSG;
42 #ifdef __cplusplus
43 extern "C" {
44 #endif /* defined(__cplusplus) */
46 #define E_DRAW VIEW_E_DRAW
47 #define DATA_E_FORMATETC DV_E_FORMATETC
49 #define OLEIVERB_PRIMARY (0L)
50 #define OLEIVERB_SHOW (-1L)
51 #define OLEIVERB_OPEN (-2L)
52 #define OLEIVERB_HIDE (-3L)
53 #define OLEIVERB_UIACTIVATE (-4L)
54 #define OLEIVERB_INPLACEACTIVATE (-5L)
55 #define OLEIVERB_DISCARDUNDOSTATE (-6L)
56 #define OLEIVERB_PROPERTIES (-7L)
59 * API declarations
61 HRESULT WINAPI RegisterDragDrop(HWND,LPDROPTARGET);
62 HRESULT WINAPI RevokeDragDrop(HWND);
63 HRESULT WINAPI DoDragDrop(LPDATAOBJECT,LPDROPSOURCE,DWORD,DWORD*);
64 HRESULT WINAPI OleLoadFromStream(IStream *pStm,REFIID iidInterface,void** ppvObj);
65 HRESULT WINAPI OleSaveToStream(IPersistStream *pPStm,IStream *pStm);
66 HOLEMENU WINAPI OleCreateMenuDescriptor(HMENU hmenuCombined,LPOLEMENUGROUPWIDTHS lpMenuWidths);
67 HRESULT WINAPI OleDestroyMenuDescriptor(HOLEMENU hmenuDescriptor);
68 HRESULT WINAPI OleSetMenuDescriptor(HOLEMENU hmenuDescriptor,HWND hwndFrame,HWND hwndActiveObject,LPOLEINPLACEFRAME lpFrame,LPOLEINPLACEACTIVEOBJECT lpActiveObject);
70 HRESULT WINAPI ReadClassStg(IStorage *pstg,CLSID *pclsid);
71 HRESULT WINAPI WriteClassStm(IStream *pStm,REFCLSID rclsid);
72 HRESULT WINAPI ReadClassStm(IStream *pStm,CLSID *pclsid);
75 HRESULT WINAPI OleSave(LPPERSISTSTORAGE pPS, LPSTORAGE pStg, BOOL fSameAsLoad);
76 HRESULT WINAPI OleRegGetUserType(REFCLSID clsid,
77 DWORD dwFormOfType,
78 LPOLESTR* pszUserType);
79 HRESULT WINAPI OleRegGetMiscStatus (REFCLSID clsid, DWORD dwAspect, DWORD* pdwStatus);
80 HRESULT WINAPI OleRegEnumFormatEtc (REFCLSID clsid,
81 DWORD dwDirection,
82 LPENUMFORMATETC* ppenumFormatetc);
83 HRESULT WINAPI CreateStreamOnHGlobal (HGLOBAL hGlobal, BOOL fDeleteOnRelease, LPSTREAM* ppstm);
84 HRESULT WINAPI GetHGlobalFromStream(LPSTREAM pstm, HGLOBAL* phglobal);
85 HRESULT WINAPI OleRegEnumVerbs (REFCLSID clsid, LPENUMOLEVERB* ppenum);
86 BOOL WINAPI OleIsRunning(LPOLEOBJECT pObject);
87 HRESULT WINAPI OleCreateLinkFromData(LPDATAOBJECT pSrcDataObj, REFIID riid,
88 DWORD renderopt, LPFORMATETC pFormatEtc,
89 LPOLECLIENTSITE pClientSite, LPSTORAGE pStg,
90 LPVOID* ppvObj);
91 HRESULT WINAPI OleSetContainedObject(LPUNKNOWN pUnknown, BOOL fContained);
92 HRESULT WINAPI OleQueryLinkFromData(IDataObject* pSrcDataObject);
93 HRESULT WINAPI OleQueryCreateFromData(LPDATAOBJECT pSrcDataObject);
94 HRESULT WINAPI OleRun(LPUNKNOWN pUnknown);
95 VOID WINAPI ReleaseStgMedium(LPSTGMEDIUM);
96 HRESULT WINAPI OleGetClipboard(IDataObject** ppDataObj);
97 HRESULT WINAPI OleIsCurrentClipboard(LPDATAOBJECT);
98 HRESULT WINAPI OleSetClipboard(LPDATAOBJECT);
99 HRESULT WINAPI OleCreateStaticFromData(LPDATAOBJECT pSrcDataObj, REFIID iid,
100 DWORD renderopt, LPFORMATETC pFormatEtc, LPOLECLIENTSITE pClientSite,
101 LPSTORAGE pStg, LPVOID* ppvObj);
102 HRESULT WINAPI ReadFmtUserTypeStg(LPSTORAGE pstg, CLIPFORMAT* pcf, LPOLESTR* lplpszUserType);
103 HRESULT WINAPI OleLoad(LPSTORAGE pStg, REFIID riid, LPOLECLIENTSITE pClientSite, LPVOID* ppvObj);
104 HRESULT WINAPI GetHGlobalFromILockBytes(LPLOCKBYTES plkbyt, HGLOBAL* phglobal);
105 HRESULT WINAPI CreateILockBytesOnHGlobal(HGLOBAL hGlobal, BOOL fDeleteOnRelease, LPLOCKBYTES* pplkbyt);
106 HRESULT WINAPI CreateDataAdviseHolder(LPDATAADVISEHOLDER* ppDAHolder);
107 HGLOBAL WINAPI OleGetIconOfClass(REFCLSID rclsid, LPOLESTR lpszLabel, BOOL fUseTypeAsLabel);
108 HRESULT WINAPI OleLockRunning(LPUNKNOWN pUnknown, BOOL fLock, BOOL fLastUnlockCloses);
109 HRESULT WINAPI OleCreateFromFile(REFCLSID rclsid, LPCOLESTR lpszFileName, REFIID riid,
110 DWORD renderopt, LPFORMATETC lpFormatEtc, LPOLECLIENTSITE pClientSite, LPSTORAGE pStg, LPVOID* ppvObj);
111 HRESULT WINAPI OleCreateLink(LPMONIKER pmkLinkSrc, REFIID riid, DWORD renderopt, LPFORMATETC lpFormatEtc,
112 LPOLECLIENTSITE pClientSite, LPSTORAGE pStg, LPVOID* ppvObj);
113 HRESULT WINAPI OleCreate(REFCLSID rclsid, REFIID riid, DWORD renderopt, LPFORMATETC pFormatEtc, LPOLECLIENTSITE pClientSite,
114 LPSTORAGE pStg, LPVOID* ppvObj);
115 HRESULT WINAPI OleFlushClipboard(void);
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 HRESULT 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 OleCreateDefaultHandler(REFCLSID clsid,
126 LPUNKNOWN pUnkOuter,
127 REFIID riid,
128 LPVOID* ppvObj);
129 HRESULT WINAPI CreateOleAdviseHolder (LPOLEADVISEHOLDER *ppOAHolder);
130 HRESULT WINAPI OleInitialize(LPVOID pvReserved);
131 void WINAPI OleUninitialize(void);
132 BOOL WINAPI IsValidInterface(LPUNKNOWN punk);
135 * OLE version conversion declarations
139 typedef struct _OLESTREAM* LPOLESTREAM;
140 typedef struct _OLESTREAMVTBL {
141 DWORD (CALLBACK *Get)(LPOLESTREAM,LPSTR,DWORD);
142 DWORD (CALLBACK *Put)(LPOLESTREAM,LPSTR,DWORD);
143 } OLESTREAMVTBL;
144 typedef OLESTREAMVTBL* LPOLESTREAMVTBL;
145 typedef struct _OLESTREAM {
146 LPOLESTREAMVTBL lpstbl;
147 } OLESTREAM;
149 HRESULT WINAPI OleConvertOLESTREAMToIStorage( LPOLESTREAM lpolestream, LPSTORAGE pstg, const DVTARGETDEVICE* ptd);
150 HRESULT WINAPI OleConvertIStorageToOLESTREAM( LPSTORAGE pstg, LPOLESTREAM lpolestream);
152 HRESULT WINAPI OleGetAutoConvert( REFCLSID clsidOld, LPCLSID pClsidNew );
153 HRESULT WINAPI OleSetAutoConvert( REFCLSID clsidOld, REFCLSID clsidNew );
155 #ifdef __cplusplus
156 } /* extern "C" */
157 #endif /* defined(__cplusplus) */
159 #endif /* __WINE_OLE2_H */