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