IExtractIcon had an extra c in a struct definition.
[wine/multimedia.git] / include / ole.h
blobc21f0677bfa82ea071a712dc5165c5c8b43934ad
1 /*
2 * ole.h - Declarations for OLESVR and OLECLI
3 */
5 #ifndef __WINE_OLE_H
6 #define __WINE_OLE_H
8 #include "windows.h"
10 typedef CHAR OLECHAR16;
11 typedef OLECHAR16 *BSTR16;
12 typedef BSTR16 *LPBSTR16;
13 typedef LPSTR LPOLESTR16;
14 typedef LPCSTR LPCOLESTR16;
15 typedef WCHAR OLECHAR32;
16 typedef OLECHAR32 *BSTR32;
17 typedef BSTR32 *LPBSTR32;
18 typedef LPWSTR LPOLESTR32;
19 typedef LPCWSTR LPCOLESTR32;
20 DECL_WINELIB_TYPE(OLECHAR)
21 DECL_WINELIB_TYPE(LPOLESTR)
22 DECL_WINELIB_TYPE(LPCOLESTR)
23 DECL_WINELIB_TYPE(BSTR)
24 DECL_WINELIB_TYPE(LPBSTR)
26 #define OLESTR16(x) x
27 #define OLESTR32(x) L##x /* probably wrong */
28 #define OLESTR WINELIB_NAME(OLESTR)
30 typedef unsigned short VARTYPE;
31 typedef LONG DISPID;
33 /* object types */
34 #define OT_LINK 1
35 #define OT_EMBEDDED 2
36 #define OT_STATIC 3
38 /* activate verbs */
39 #define OLEVERB_PRIMARY 0
41 typedef enum
43 OLE_OK,
44 OLE_WAIT_FOR_RELEASE,
45 OLE_BUSY,
46 OLE_ERROR_PROTECT_ONLY,
47 OLE_ERROR_MEMORY,
48 OLE_ERROR_STREAM,
49 OLE_ERROR_STATIC,
50 OLE_ERROR_BLANK,
51 OLE_ERROR_DRAW,
52 OLE_ERROR_METAFILE,
53 OLE_ERROR_ABORT,
54 OLE_ERROR_CLIPBOARD,
55 OLE_ERROR_FORMAT,
56 OLE_ERROR_OBJECT,
57 OLE_ERROR_OPTION,
58 OLE_ERROR_PROTOCOL,
59 OLE_ERROR_ADDRESS,
60 OLE_ERROR_NOT_EQUAL,
61 OLE_ERROR_HANDLE,
62 OLE_ERROR_GENERIC,
63 OLE_ERROR_CLASS,
64 OLE_ERROR_SYNTAX,
65 OLE_ERROR_DATATYPE,
66 OLE_ERROR_PALETTE,
67 OLE_ERROR_NOT_LINK,
68 OLE_ERROR_NOT_EMPTY,
69 OLE_ERROR_SIZE,
70 OLE_ERROR_DRIVE,
71 OLE_ERROR_NETWORK,
72 OLE_ERROR_NAME,
73 OLE_ERROR_TEMPLATE,
74 OLE_ERROR_NEW,
75 OLE_ERROR_EDIT,
76 OLE_ERROR_OPEN,
77 OLE_ERROR_NOT_OPEN,
78 OLE_ERROR_LAUNCH,
79 OLE_ERROR_COMM,
80 OLE_ERROR_TERMINATE,
81 OLE_ERROR_COMMAND,
82 OLE_ERROR_SHOW,
83 OLE_ERROR_DOVERB,
84 OLE_ERROR_ADVISE_NATIVE,
85 OLE_ERROR_ADVISE_PICT,
86 OLE_ERROR_ADVISE_RENAME,
87 OLE_ERROR_POKE_NATIVE,
88 OLE_ERROR_REQUEST_NATIVE,
89 OLE_ERROR_REQUEST_PICT,
90 OLE_ERROR_SERVER_BLOCKED,
91 OLE_ERROR_REGISTRATION,
92 OLE_ERROR_ALREADY_REGISTERED,
93 OLE_ERROR_TASK,
94 OLE_ERROR_OUTOFDATE,
95 OLE_ERROR_CANT_UPDATE_CLIENT,
96 OLE_ERROR_UPDATE,
97 OLE_ERROR_SETDATA_FORMAT,
98 OLE_ERROR_STATIC_FROM_OTHER_OS,
99 OLE_WARN_DELETE_DATA = 1000
100 } OLESTATUS;
102 typedef enum {
103 OLE_SERVER_MULTI,
104 OLE_SERVER_SINGLE
105 } OLE_SERVER_USE;
107 typedef enum {
108 OLE_CHANGED,
109 OLE_SAVED,
110 OLE_CLOSED,
111 OLE_RENAMED,
112 OLE_QUERY_PAINT,
113 OLE_RELEASE,
114 OLE_QUERY_RETRY
115 } OLE_NOTIFICATION;
117 typedef enum {
118 olerender_none,
119 olerender_draw,
120 olerender_format
121 } OLEOPT_RENDER;
123 typedef enum {
124 oleupdate_always,
125 oleupdate_onsave,
126 oleupdate_oncall,
127 oleupdate_onclose
128 } OLEOPT_UPDATE;
130 typedef LONG LHSERVER;
131 typedef LONG LHSERVERDOC;
132 typedef LONG LHCLIENTDOC;
133 typedef LONG OLECLIPFORMAT;/* dunno about this type, please change/add */
134 typedef OLEOPT_UPDATE* LPOLEOPT_UPDATE;
136 typedef enum {
137 OLE_NONE, /* none */
138 OLE_DELETE, /* delete object */
139 OLE_LNKPASTE, /* link paste */
140 OLE_EMBPASTE, /* paste(and update) */
141 OLE_SHOW,
142 OLE_RUN,
143 OLE_ACTIVATE,
144 OLE_UPDATE,
145 OLE_CLOSE,
146 OLE_RECONNECT,
147 OLE_SETUPDATEOPTIONS,
148 OLE_SERVERRUNLAUNCH, /* unlaunch (terminate?) server */
149 OLE_LOADFROMSTREAM, /* (auto reconnect) */
150 OLE_SETDATA, /* OleSetData */
151 OLE_REQUESTDATA, /* OleRequestData */
152 OLE_OTHER,
153 OLE_CREATE,
154 OLE_CREATEFROMTEMPLATE,
155 OLE_CREATELINKFROMFILE,
156 OLE_COPYFROMLNK,
157 OLE_CREATREFROMFILE,
158 OLE_CREATEINVISIBLE
159 } OLE_RELEASE_METHOD;
161 typedef struct _OLETARGETDEVICE {
162 UINT16 otdDeviceNameOffset;
163 UINT16 otdDriverNameOffset;
164 UINT16 otdPortNameOffset;
165 UINT16 otdExtDevmodeOffset;
166 UINT16 otdExtDevmodeSize;
167 UINT16 otdEnvironmentOffset;
168 UINT16 otdEnvironmentSize;
169 BYTE otdData[1];
170 /* ... */
171 } OLETARGETDEVICE;
172 typedef struct _OLESTREAM* LPOLESTREAM;
173 typedef struct _OLESTREAMVTBL {
174 DWORD (CALLBACK *Get)(LPOLESTREAM,LPSTR,DWORD);
175 DWORD (CALLBACK *Put)(LPOLESTREAM,LPSTR,DWORD);
176 } OLESTREAMVTBL;
177 typedef OLESTREAMVTBL* LPOLESTREAMVTBL;
178 typedef struct _OLESTREAM {
179 LPOLESTREAMVTBL lpstbl;
180 } OLESTREAM;
181 typedef struct _OLESERVERDOC* LPOLESERVERDOC;
182 typedef struct _OLEOBJECT* LPOLEOBJECT;
183 typedef struct _OLECLIENT* LPOLECLIENT;
184 typedef struct _OLESERVERDOCVTBL {
185 OLESTATUS (CALLBACK *Save)(LPOLESERVERDOC);
186 OLESTATUS (CALLBACK *Close)(LPOLESERVERDOC);
187 OLESTATUS (CALLBACK *SetHostNames)(LPOLESERVERDOC,LPCOLESTR16,LPCOLESTR16);
188 OLESTATUS (CALLBACK *SetDocDimensions)(LPOLESERVERDOC,LPRECT16);
189 #undef GetObject /* FIXME */
190 OLESTATUS (CALLBACK *GetObject)(LPOLESERVERDOC,LPCOLESTR16,LPOLEOBJECT*,LPOLECLIENT);
191 OLESTATUS (CALLBACK *Release)(LPOLESERVERDOC);
192 OLESTATUS (CALLBACK *SetColorScheme)(LPOLESERVERDOC,LPLOGPALETTE);
193 OLESTATUS (CALLBACK *Execute)(LPOLESERVERDOC,HGLOBAL16);
194 } OLESERVERDOCVTBL;
195 typedef OLESERVERDOCVTBL* LPOLESERVERDOCVTBL;
196 typedef struct _OLESERVERDOC {
197 LPOLESERVERDOCVTBL lpvtbl;
198 /* server provided state info */
199 } OLESERVERDOC;
201 typedef struct _OLESERVER* LPOLESERVER;
202 typedef struct _OLESERVERVTBL {
203 OLESTATUS (CALLBACK *Open)(LPOLESERVER,LHSERVERDOC,LPCOLESTR16,LPOLESERVERDOC *);
204 OLESTATUS (CALLBACK *Create)(LPOLESERVER,LHSERVERDOC,LPCOLESTR16,LPCOLESTR16,LPOLESERVERDOC*);
205 OLESTATUS (CALLBACK *CreateFromTemplate)(LPOLESERVER,LHSERVERDOC,LPCOLESTR16,LPCOLESTR16,LPCOLESTR16,LPOLESERVERDOC *);
206 OLESTATUS (CALLBACK *Edit)(LPOLESERVER,LHSERVERDOC,LPCOLESTR16,LPCOLESTR16,LPOLESERVERDOC *);
207 OLESTATUS (CALLBACK *Exit)(LPOLESERVER);
208 OLESTATUS (CALLBACK *Release)(LPOLESERVER);
209 OLESTATUS (CALLBACK *Execute)(LPOLESERVER);
210 } OLESERVERVTBL;
211 typedef OLESERVERVTBL *LPOLESERVERVTBL;
212 typedef struct _OLESERVER {
213 LPOLESERVERVTBL lpvtbl;
214 /* server specific data */
215 } OLESERVER;
216 typedef struct _OLECLIENTVTBL {
217 int (CALLBACK *CallBack)(LPOLECLIENT,OLE_NOTIFICATION,LPOLEOBJECT);
218 } OLECLIENTVTBL;
219 typedef OLECLIENTVTBL *LPOLECLIENTVTBL;
221 typedef struct _OLECLIENT {
222 LPOLECLIENTVTBL lpvtbl;
223 /* client data... */
224 } OLECLIENT;
226 typedef struct _OLEOBJECTVTBL {
227 void * (CALLBACK *QueryProtocol)(LPOLEOBJECT,LPCOLESTR16);
228 OLESTATUS (CALLBACK *Release)(LPOLEOBJECT);
229 OLESTATUS (CALLBACK *Show)(LPOLEOBJECT,BOOL16);
230 OLESTATUS (CALLBACK *DoVerb)(LPOLEOBJECT,UINT16,BOOL16,BOOL16);
231 OLESTATUS (CALLBACK *GetData)(LPOLEOBJECT,OLECLIPFORMAT,HANDLE16 *);
232 OLESTATUS (CALLBACK *SetData)(LPOLEOBJECT,OLECLIPFORMAT,HANDLE16);
233 OLESTATUS (CALLBACK *SetTargetDevice)(LPOLEOBJECT,HGLOBAL16);
234 OLESTATUS (CALLBACK *SetBounds)(LPOLEOBJECT,LPRECT16);
235 OLESTATUS (CALLBACK *EnumFormats)(LPOLEOBJECT,OLECLIPFORMAT);
236 OLESTATUS (CALLBACK *SetColorScheme)(LPOLEOBJECT,LPLOGPALETTE);
237 OLESTATUS (CALLBACK *Delete)(LPOLEOBJECT);
238 OLESTATUS (CALLBACK *SetHostNames)(LPOLEOBJECT,LPCOLESTR16,LPCOLESTR16);
239 OLESTATUS (CALLBACK *SaveToStream)(LPOLEOBJECT,LPOLESTREAM);
240 OLESTATUS (CALLBACK *Clone)(LPOLEOBJECT,LPOLECLIENT,LHCLIENTDOC,LPCOLESTR16,LPOLEOBJECT *);
241 OLESTATUS (CALLBACK *CopyFromLink)(LPOLEOBJECT,LPOLECLIENT,LHCLIENTDOC,LPCOLESTR16,LPOLEOBJECT *);
242 OLESTATUS (CALLBACK *Equal)(LPOLEOBJECT,LPOLEOBJECT);
243 OLESTATUS (CALLBACK *CopyToClipBoard)(LPOLEOBJECT);
244 OLESTATUS (CALLBACK *Draw)(LPOLEOBJECT,HDC16,LPRECT16,LPRECT16,HDC16);
245 OLESTATUS (CALLBACK *Activate)(LPOLEOBJECT,UINT16,BOOL16,BOOL16,HWND16,LPRECT16);
246 OLESTATUS (CALLBACK *Execute)(LPOLEOBJECT,HGLOBAL16,UINT16);
247 OLESTATUS (CALLBACK *Close)(LPOLEOBJECT);
248 OLESTATUS (CALLBACK *Update)(LPOLEOBJECT);
249 OLESTATUS (CALLBACK *Reconnect)(LPOLEOBJECT);
250 OLESTATUS (CALLBACK *ObjectConvert)(LPOLEOBJECT,LPCOLESTR16,LPOLECLIENT,LHCLIENTDOC,LPCOLESTR16,LPOLEOBJECT*);
251 OLESTATUS (CALLBACK *GetLinkUpdateOptions)(LPOLEOBJECT,LPOLEOPT_UPDATE);
252 OLESTATUS (CALLBACK *SetLinkUpdateOptions)(LPOLEOBJECT,OLEOPT_UPDATE);
253 OLESTATUS (CALLBACK *Rename)(LPOLEOBJECT,LPCOLESTR16);
254 OLESTATUS (CALLBACK *QueryName)(LPOLEOBJECT,LPSTR,LPUINT16);
255 OLESTATUS (CALLBACK *QueryType)(LPOLEOBJECT,LPLONG);
256 OLESTATUS (CALLBACK *QueryBounds)(LPOLEOBJECT,LPRECT16);
257 OLESTATUS (CALLBACK *QuerySize)(LPOLEOBJECT,LPDWORD);
258 OLESTATUS (CALLBACK *QueryOpen)(LPOLEOBJECT);
259 OLESTATUS (CALLBACK *QueryOutOfDate)(LPOLEOBJECT);
260 OLESTATUS (CALLBACK *QueryReleaseStatus)(LPOLEOBJECT);
261 OLESTATUS (CALLBACK *QueryReleaseError)(LPOLEOBJECT);
262 OLE_RELEASE_METHOD (CALLBACK *QueryReleaseMethod)(LPOLEOBJECT);
263 OLESTATUS (CALLBACK *RequestData)(LPOLEOBJECT,OLECLIPFORMAT);
264 OLESTATUS (CALLBACK *ObjectLong)(LPOLEOBJECT,UINT16,LPLONG);
265 } OLEOBJECTVTBL;
266 typedef OLEOBJECTVTBL* LPOLEOBJECTVTBL;
268 typedef struct _OLEOBJECT {
269 LPOLEOBJECTVTBL lpvtbl;
270 } OLEOBJECT;
273 OLESTATUS WINAPI OleRegisterServer(LPCSTR,LPOLESERVER,LHSERVER *,HINSTANCE16,OLE_SERVER_USE);
274 OLESTATUS WINAPI OleUnblockServer(LHSERVER,BOOL16 *);
275 OLESTATUS WINAPI OleRegisterServerDoc(LHSERVER,LPCSTR,LPOLESERVERDOC,LHSERVERDOC *);
276 OLESTATUS WINAPI OleRegisterClientDoc(LPCSTR,LPCSTR,LONG,LHCLIENTDOC *);
277 OLESTATUS WINAPI OleRenameClientDoc(LHCLIENTDOC,LPCSTR);
278 OLESTATUS WINAPI OleRevokeServerDoc(LHSERVERDOC);
279 OLESTATUS WINAPI OleRevokeClientDoc(LHCLIENTDOC);
280 OLESTATUS WINAPI OleRevokeServer(LHSERVER);
282 typedef enum tagCALLCONV {
283 CC_CDECL = 1,
284 CC_MSCPASCAL = CC_CDECL + 1,
285 CC_PASCAL = CC_MSCPASCAL,
286 CC_MACPASCAL = CC_PASCAL + 1,
287 CC_STDCALL = CC_MACPASCAL + 1,
288 CC_RESERVED = CC_STDCALL + 1,
289 CC_SYSCALL = CC_RESERVED + 1,
290 CC_MPWCDECL = CC_SYSCALL + 1,
291 CC_MPWPASCAL = CC_MPWCDECL + 1,
292 CC_MAX = CC_MPWPASCAL + 1
293 } CALLCONV;
295 typedef struct tagPARAMDATA {
296 OLECHAR16 * szName; /* parameter name */
297 VARTYPE vt; /* parameter type */
298 } PARAMDATA, * LPPARAMDATA;
300 typedef struct tagMETHODDATA {
301 OLECHAR16 * szName; /* method name */
302 PARAMDATA * ppdata; /* pointer to an array of PARAMDATAs */
303 DISPID dispid; /* method ID */
304 UINT16 iMeth; /* method index */
305 CALLCONV cc; /* calling convention */
306 UINT16 cArgs; /* count of arguments */
307 WORD wFlags; /* same wFlags as on IDispatch::Invoke() */
308 VARTYPE vtReturn;
309 } METHODDATA, * LPMETHODDATA;
311 typedef struct tagINTERFACEDATA {
312 METHODDATA * pmethdata; /* pointer to an array of METHODDATAs */
313 UINT16 cMembers; /* count of members */
314 } INTERFACEDATA, * LPINTERFACEDATA;
317 #endif /* __WINE_OLE_H */