kernel32/tests: Fix a race condition in test_QueryInformationJobObject().
[wine.git] / include / ole2.h
blob05c1b5502c74d6be18cd464fa204b6585fb0906e
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #ifndef __WINE_OLE2_H
22 #define __WINE_OLE2_H
24 #include <winerror.h>
25 #include <objbase.h>
26 #include <oleauto.h>
27 #include <oleidl.h>
29 struct tagMSG;
31 #ifdef __cplusplus
32 extern "C" {
33 #endif /* defined(__cplusplus) */
35 #define E_DRAW VIEW_E_DRAW
36 #define DATA_E_FORMATETC DV_E_FORMATETC
38 #define OLEIVERB_PRIMARY (__MSABI_LONG(0))
39 #define OLEIVERB_SHOW (__MSABI_LONG(-1))
40 #define OLEIVERB_OPEN (__MSABI_LONG(-2))
41 #define OLEIVERB_HIDE (__MSABI_LONG(-3))
42 #define OLEIVERB_UIACTIVATE (__MSABI_LONG(-4))
43 #define OLEIVERB_INPLACEACTIVATE (__MSABI_LONG(-5))
44 #define OLEIVERB_DISCARDUNDOSTATE (__MSABI_LONG(-6))
45 #define OLEIVERB_PROPERTIES (__MSABI_LONG(-7))
47 #define EMBDHLP_INPROC_HANDLER 0x00000000
48 #define EMBDHLP_INPROC_SERVER 0x00000001
49 #define EMBDHLP_CREATENOW 0x00000000
50 #define EMBDHLP_DELAYCREATE 0x00010000
53 * API declarations
55 HRESULT WINAPI RegisterDragDrop(HWND,LPDROPTARGET);
56 HRESULT WINAPI RevokeDragDrop(HWND);
57 HRESULT WINAPI DoDragDrop(LPDATAOBJECT,LPDROPSOURCE,DWORD,DWORD*);
58 HRESULT WINAPI OleLoadFromStream(IStream *pStm,REFIID iidInterface,void** ppvObj);
59 HRESULT WINAPI OleSaveToStream(IPersistStream *pPStm,IStream *pStm);
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);
64 HRESULT WINAPI WriteClassStg(IStorage *pstg, REFCLSID rclsid);
65 HRESULT WINAPI ReadClassStg(IStorage *pstg,CLSID *pclsid);
66 HRESULT WINAPI WriteClassStm(IStream *pStm,REFCLSID rclsid);
67 HRESULT WINAPI ReadClassStm(IStream *pStm,CLSID *pclsid);
70 HRESULT WINAPI OleSave(LPPERSISTSTORAGE pPS, LPSTORAGE pStg, BOOL fSameAsLoad);
71 HRESULT WINAPI OleRegGetUserType(REFCLSID clsid,
72 DWORD dwFormOfType,
73 LPOLESTR* pszUserType);
74 HRESULT WINAPI OleRegGetMiscStatus (REFCLSID clsid, DWORD dwAspect, DWORD* pdwStatus);
75 HRESULT WINAPI OleRegEnumFormatEtc (REFCLSID clsid,
76 DWORD dwDirection,
77 LPENUMFORMATETC* ppenumFormatetc);
78 HRESULT WINAPI CreateStreamOnHGlobal (HGLOBAL hGlobal, BOOL fDeleteOnRelease, LPSTREAM* ppstm);
79 HRESULT WINAPI GetHGlobalFromStream(LPSTREAM pstm, HGLOBAL* phglobal);
80 HRESULT WINAPI OleRegEnumVerbs (REFCLSID clsid, LPENUMOLEVERB* ppenum);
81 BOOL WINAPI OleIsRunning(LPOLEOBJECT pObject);
82 HRESULT WINAPI OleCreateLinkFromData(LPDATAOBJECT pSrcDataObj, REFIID riid,
83 DWORD renderopt, LPFORMATETC pFormatEtc,
84 LPOLECLIENTSITE pClientSite, LPSTORAGE pStg,
85 LPVOID* ppvObj);
86 HRESULT WINAPI OleSetContainedObject(LPUNKNOWN pUnknown, BOOL fContained);
87 HRESULT WINAPI OleNoteObjectVisible(LPUNKNOWN pUnknown, BOOL fVisible);
88 HRESULT WINAPI OleQueryLinkFromData(IDataObject* pSrcDataObject);
89 HRESULT WINAPI OleQueryCreateFromData(LPDATAOBJECT pSrcDataObject);
90 HRESULT WINAPI OleRun(LPUNKNOWN pUnknown);
91 HRESULT WINAPI OleDraw(LPUNKNOWN pUnknown, DWORD dwAspect, HDC hdcDraw, LPCRECT lprcBounds);
92 VOID WINAPI ReleaseStgMedium(LPSTGMEDIUM);
93 HRESULT WINAPI OleGetClipboard(IDataObject** ppDataObj);
94 HRESULT WINAPI OleIsCurrentClipboard(LPDATAOBJECT);
95 HRESULT WINAPI OleSetClipboard(LPDATAOBJECT);
96 HRESULT WINAPI OleCreateStaticFromData(LPDATAOBJECT pSrcDataObj, REFIID iid,
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);
101 HRESULT WINAPI GetHGlobalFromILockBytes(LPLOCKBYTES plkbyt, HGLOBAL* phglobal);
102 HRESULT WINAPI CreateILockBytesOnHGlobal(HGLOBAL hGlobal, BOOL fDeleteOnRelease, LPLOCKBYTES* pplkbyt);
103 HRESULT WINAPI CreateDataAdviseHolder(LPDATAADVISEHOLDER* ppDAHolder);
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 OleCreateFromFileEx(REFCLSID clsid, LPCOLESTR filename, REFIID iid, DWORD flags,
111 DWORD renderopt, ULONG num_fmts, DWORD *adv_flags, LPFORMATETC fmts, IAdviseSink *sink,
112 DWORD *conns, LPOLECLIENTSITE client_site, LPSTORAGE storage, LPVOID* obj);
113 HRESULT WINAPI OleCreateLink(LPMONIKER pmkLinkSrc, REFIID riid, DWORD renderopt, LPFORMATETC lpFormatEtc,
114 LPOLECLIENTSITE pClientSite, LPSTORAGE pStg, LPVOID* ppvObj);
115 HRESULT WINAPI OleCreate(REFCLSID rclsid, REFIID riid, DWORD renderopt, LPFORMATETC pFormatEtc, LPOLECLIENTSITE pClientSite,
116 LPSTORAGE pStg, LPVOID* ppvObj);
117 HRESULT WINAPI OleFlushClipboard(void);
118 HRESULT WINAPI GetConvertStg(LPSTORAGE pStg);
119 HRESULT WINAPI SetConvertStg(LPSTORAGE pStg, BOOL fConvert);
120 BOOL WINAPI IsAccelerator(HACCEL hAccel, int cAccelEntries, struct tagMSG* lpMsg, WORD* lpwCmd);
121 HRESULT WINAPI OleCreateLinkToFile(LPCOLESTR lpszFileName, REFIID riid, DWORD renderopt, LPFORMATETC lpFormatEtc,
122 LPOLECLIENTSITE pClientSite, LPSTORAGE pStg, LPVOID* ppvObj);
123 HANDLE WINAPI OleDuplicateData(HANDLE hSrc, CLIPFORMAT cfFormat, UINT uiFlags);
124 HRESULT WINAPI WriteFmtUserTypeStg(LPSTORAGE pstg, CLIPFORMAT cf, LPOLESTR lpszUserType);
125 HRESULT WINAPI OleTranslateAccelerator (LPOLEINPLACEFRAME lpFrame, LPOLEINPLACEFRAMEINFO lpFrameInfo, struct tagMSG* lpmsg);
126 HRESULT WINAPI OleCreateFromData(LPDATAOBJECT pSrcDataObj, REFIID riid, DWORD renderopt, LPFORMATETC pFormatEtc,
127 LPOLECLIENTSITE pClientSite, LPSTORAGE pStg, LPVOID* ppvObj);
128 HRESULT WINAPI OleCreateFromDataEx(LPDATAOBJECT pSrcDataObj, REFIID riid, DWORD dwFlags, DWORD renderopt, ULONG num_formats,
129 DWORD *adv_flags, LPFORMATETC fmts, IAdviseSink *sink, DWORD *conns,
130 LPOLECLIENTSITE pClientSite, LPSTORAGE pStg, LPVOID* ppvObj);
131 HRESULT WINAPI OleCreateDefaultHandler(REFCLSID clsid,
132 LPUNKNOWN pUnkOuter,
133 REFIID riid,
134 LPVOID* ppvObj);
135 HRESULT WINAPI OleCreateEmbeddingHelper(REFCLSID clsid,
136 LPUNKNOWN pUnkOuter,
137 DWORD flags,
138 IClassFactory *pCF,
139 REFIID riid,
140 LPVOID* ppvObj);
141 HRESULT WINAPI CreateOleAdviseHolder (LPOLEADVISEHOLDER *ppOAHolder);
142 HRESULT WINAPI OleInitialize(LPVOID pvReserved);
143 void WINAPI OleUninitialize(void);
144 BOOL WINAPI IsValidInterface(LPUNKNOWN punk);
145 DWORD WINAPI OleBuildVersion(VOID);
148 * OLE version conversion declarations
152 typedef struct _OLESTREAM* LPOLESTREAM;
153 typedef struct _OLESTREAMVTBL {
154 DWORD (CALLBACK *Get)(LPOLESTREAM,LPSTR,DWORD);
155 DWORD (CALLBACK *Put)(LPOLESTREAM,LPSTR,DWORD);
156 } OLESTREAMVTBL;
157 typedef OLESTREAMVTBL* LPOLESTREAMVTBL;
158 typedef struct _OLESTREAM {
159 LPOLESTREAMVTBL lpstbl;
160 } OLESTREAM;
162 HRESULT WINAPI OleConvertOLESTREAMToIStorage( LPOLESTREAM lpolestream, LPSTORAGE pstg, const DVTARGETDEVICE* ptd);
163 HRESULT WINAPI OleConvertIStorageToOLESTREAM( LPSTORAGE pstg, LPOLESTREAM lpolestream);
165 HRESULT WINAPI OleDoAutoConvert( LPSTORAGE pStg, LPCLSID pClsidNew );
166 HRESULT WINAPI OleGetAutoConvert( REFCLSID clsidOld, LPCLSID pClsidNew );
167 HRESULT WINAPI OleSetAutoConvert( REFCLSID clsidOld, REFCLSID clsidNew );
169 #ifdef __cplusplus
170 } /* extern "C" */
171 #endif /* defined(__cplusplus) */
173 #endif /* __WINE_OLE2_H */