NE_MODULE.stack_size was set to a ridiculously small value of 5.
[wine/multimedia.git] / include / ole.h
blob866415e466244c3d4659f3a5fdbeb3aff7e3ecbd
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 enum tagCLSCTX
32 CLSCTX_INPROC_SERVER = 0x1,
33 CLSCTX_INPROC_HANDLER = 0x2,
34 CLSCTX_LOCAL_SERVER = 0x4,
35 CLSCTX_REMOTE_SERVER = 0x10,
36 } CLSCTX;
38 #define CLSCTX_SERVER (CLSCTX_INPROC_SERVER|CLSCTX_LOCAL_SERVER|CLSCTX_REMOTE_SERVER)
39 #define CLSCTX_ALL (CLSCTX_INPROC_HANDLER|CLSCTX_SERVER)
41 typedef unsigned short VARTYPE;
42 typedef LONG DISPID;
44 /* object types */
45 #define OT_LINK 1
46 #define OT_EMBEDDED 2
47 #define OT_STATIC 3
49 /* activate verbs */
50 #define OLEVERB_PRIMARY 0
52 typedef enum
54 OLE_OK,
55 OLE_WAIT_FOR_RELEASE,
56 OLE_BUSY,
57 OLE_ERROR_PROTECT_ONLY,
58 OLE_ERROR_MEMORY,
59 OLE_ERROR_STREAM,
60 OLE_ERROR_STATIC,
61 OLE_ERROR_BLANK,
62 OLE_ERROR_DRAW,
63 OLE_ERROR_METAFILE,
64 OLE_ERROR_ABORT,
65 OLE_ERROR_CLIPBOARD,
66 OLE_ERROR_FORMAT,
67 OLE_ERROR_OBJECT,
68 OLE_ERROR_OPTION,
69 OLE_ERROR_PROTOCOL,
70 OLE_ERROR_ADDRESS,
71 OLE_ERROR_NOT_EQUAL,
72 OLE_ERROR_HANDLE,
73 OLE_ERROR_GENERIC,
74 OLE_ERROR_CLASS,
75 OLE_ERROR_SYNTAX,
76 OLE_ERROR_DATATYPE,
77 OLE_ERROR_PALETTE,
78 OLE_ERROR_NOT_LINK,
79 OLE_ERROR_NOT_EMPTY,
80 OLE_ERROR_SIZE,
81 OLE_ERROR_DRIVE,
82 OLE_ERROR_NETWORK,
83 OLE_ERROR_NAME,
84 OLE_ERROR_TEMPLATE,
85 OLE_ERROR_NEW,
86 OLE_ERROR_EDIT,
87 OLE_ERROR_OPEN,
88 OLE_ERROR_NOT_OPEN,
89 OLE_ERROR_LAUNCH,
90 OLE_ERROR_COMM,
91 OLE_ERROR_TERMINATE,
92 OLE_ERROR_COMMAND,
93 OLE_ERROR_SHOW,
94 OLE_ERROR_DOVERB,
95 OLE_ERROR_ADVISE_NATIVE,
96 OLE_ERROR_ADVISE_PICT,
97 OLE_ERROR_ADVISE_RENAME,
98 OLE_ERROR_POKE_NATIVE,
99 OLE_ERROR_REQUEST_NATIVE,
100 OLE_ERROR_REQUEST_PICT,
101 OLE_ERROR_SERVER_BLOCKED,
102 OLE_ERROR_REGISTRATION,
103 OLE_ERROR_ALREADY_REGISTERED,
104 OLE_ERROR_TASK,
105 OLE_ERROR_OUTOFDATE,
106 OLE_ERROR_CANT_UPDATE_CLIENT,
107 OLE_ERROR_UPDATE,
108 OLE_ERROR_SETDATA_FORMAT,
109 OLE_ERROR_STATIC_FROM_OTHER_OS,
110 OLE_WARN_DELETE_DATA = 1000
111 } OLESTATUS;
113 typedef enum {
114 OLE_SERVER_MULTI,
115 OLE_SERVER_SINGLE
116 } OLE_SERVER_USE;
118 typedef enum {
119 OLE_CHANGED,
120 OLE_SAVED,
121 OLE_CLOSED,
122 OLE_RENAMED,
123 OLE_QUERY_PAINT,
124 OLE_RELEASE,
125 OLE_QUERY_RETRY
126 } OLE_NOTIFICATION;
128 typedef enum {
129 olerender_none,
130 olerender_draw,
131 olerender_format
132 } OLEOPT_RENDER;
134 typedef enum {
135 oleupdate_always,
136 oleupdate_onsave,
137 oleupdate_oncall,
138 oleupdate_onclose
139 } OLEOPT_UPDATE;
141 typedef LONG LHSERVER;
142 typedef LONG LHSERVERDOC;
143 typedef LONG LHCLIENTDOC;
144 typedef LONG OLECLIPFORMAT;/* dunno about this type, please change/add */
145 typedef OLEOPT_UPDATE* LPOLEOPT_UPDATE;
147 typedef enum {
148 OLE_NONE, /* none */
149 OLE_DELETE, /* delete object */
150 OLE_LNKPASTE, /* link paste */
151 OLE_EMBPASTE, /* paste(and update) */
152 OLE_SHOW,
153 OLE_RUN,
154 OLE_ACTIVATE,
155 OLE_UPDATE,
156 OLE_CLOSE,
157 OLE_RECONNECT,
158 OLE_SETUPDATEOPTIONS,
159 OLE_SERVERRUNLAUNCH, /* unlaunch (terminate?) server */
160 OLE_LOADFROMSTREAM, /* (auto reconnect) */
161 OLE_SETDATA, /* OleSetData */
162 OLE_REQUESTDATA, /* OleRequestData */
163 OLE_OTHER,
164 OLE_CREATE,
165 OLE_CREATEFROMTEMPLATE,
166 OLE_CREATELINKFROMFILE,
167 OLE_COPYFROMLNK,
168 OLE_CREATREFROMFILE,
169 OLE_CREATEINVISIBLE
170 } OLE_RELEASE_METHOD;
172 typedef struct _OLETARGETDEVICE {
173 UINT16 otdDeviceNameOffset;
174 UINT16 otdDriverNameOffset;
175 UINT16 otdPortNameOffset;
176 UINT16 otdExtDevmodeOffset;
177 UINT16 otdExtDevmodeSize;
178 UINT16 otdEnvironmentOffset;
179 UINT16 otdEnvironmentSize;
180 BYTE otdData[1];
181 /* ... */
182 } OLETARGETDEVICE;
183 typedef struct _OLESTREAM* LPOLESTREAM;
184 typedef struct _OLESTREAMVTBL {
185 DWORD (CALLBACK *Get)(LPOLESTREAM,LPSTR,DWORD);
186 DWORD (CALLBACK *Put)(LPOLESTREAM,LPSTR,DWORD);
187 } OLESTREAMVTBL;
188 typedef OLESTREAMVTBL* LPOLESTREAMVTBL;
189 typedef struct _OLESTREAM {
190 LPOLESTREAMVTBL lpstbl;
191 } OLESTREAM;
192 typedef struct _OLESERVERDOC* LPOLESERVERDOC;
193 typedef struct _OLEOBJECT* LPOLEOBJECT;
194 typedef struct _OLECLIENT* LPOLECLIENT;
195 typedef struct _OLESERVERDOCVTBL {
196 OLESTATUS (CALLBACK *Save)(LPOLESERVERDOC);
197 OLESTATUS (CALLBACK *Close)(LPOLESERVERDOC);
198 OLESTATUS (CALLBACK *SetHostNames)(LPOLESERVERDOC,LPCOLESTR16,LPCOLESTR16);
199 OLESTATUS (CALLBACK *SetDocDimensions)(LPOLESERVERDOC,LPRECT16);
200 #undef GetObject /* FIXME */
201 OLESTATUS (CALLBACK *GetObject)(LPOLESERVERDOC,LPCOLESTR16,LPOLEOBJECT*,LPOLECLIENT);
202 OLESTATUS (CALLBACK *Release)(LPOLESERVERDOC);
203 OLESTATUS (CALLBACK *SetColorScheme)(LPOLESERVERDOC,LPLOGPALETTE);
204 OLESTATUS (CALLBACK *Execute)(LPOLESERVERDOC,HGLOBAL16);
205 } OLESERVERDOCVTBL;
206 typedef OLESERVERDOCVTBL* LPOLESERVERDOCVTBL;
207 typedef struct _OLESERVERDOC {
208 LPOLESERVERDOCVTBL lpvtbl;
209 /* server provided state info */
210 } OLESERVERDOC;
212 typedef struct _OLESERVER* LPOLESERVER;
213 typedef struct _OLESERVERVTBL {
214 OLESTATUS (CALLBACK *Open)(LPOLESERVER,LHSERVERDOC,LPCOLESTR16,LPOLESERVERDOC *);
215 OLESTATUS (CALLBACK *Create)(LPOLESERVER,LHSERVERDOC,LPCOLESTR16,LPCOLESTR16,LPOLESERVERDOC*);
216 OLESTATUS (CALLBACK *CreateFromTemplate)(LPOLESERVER,LHSERVERDOC,LPCOLESTR16,LPCOLESTR16,LPCOLESTR16,LPOLESERVERDOC *);
217 OLESTATUS (CALLBACK *Edit)(LPOLESERVER,LHSERVERDOC,LPCOLESTR16,LPCOLESTR16,LPOLESERVERDOC *);
218 OLESTATUS (CALLBACK *Exit)(LPOLESERVER);
219 OLESTATUS (CALLBACK *Release)(LPOLESERVER);
220 OLESTATUS (CALLBACK *Execute)(LPOLESERVER);
221 } OLESERVERVTBL;
222 typedef OLESERVERVTBL *LPOLESERVERVTBL;
223 typedef struct _OLESERVER {
224 LPOLESERVERVTBL lpvtbl;
225 /* server specific data */
226 } OLESERVER;
227 typedef struct _OLECLIENTVTBL {
228 int (CALLBACK *CallBack)(LPOLECLIENT,OLE_NOTIFICATION,LPOLEOBJECT);
229 } OLECLIENTVTBL;
230 typedef OLECLIENTVTBL *LPOLECLIENTVTBL;
232 typedef struct _OLECLIENT {
233 LPOLECLIENTVTBL lpvtbl;
234 /* client data... */
235 } OLECLIENT;
237 typedef struct _OLEOBJECTVTBL {
238 void * (CALLBACK *QueryProtocol)(LPOLEOBJECT,LPCOLESTR16);
239 OLESTATUS (CALLBACK *Release)(LPOLEOBJECT);
240 OLESTATUS (CALLBACK *Show)(LPOLEOBJECT,BOOL16);
241 OLESTATUS (CALLBACK *DoVerb)(LPOLEOBJECT,UINT16,BOOL16,BOOL16);
242 OLESTATUS (CALLBACK *GetData)(LPOLEOBJECT,OLECLIPFORMAT,HANDLE16 *);
243 OLESTATUS (CALLBACK *SetData)(LPOLEOBJECT,OLECLIPFORMAT,HANDLE16);
244 OLESTATUS (CALLBACK *SetTargetDevice)(LPOLEOBJECT,HGLOBAL16);
245 OLESTATUS (CALLBACK *SetBounds)(LPOLEOBJECT,LPRECT16);
246 OLESTATUS (CALLBACK *EnumFormats)(LPOLEOBJECT,OLECLIPFORMAT);
247 OLESTATUS (CALLBACK *SetColorScheme)(LPOLEOBJECT,LPLOGPALETTE);
248 OLESTATUS (CALLBACK *Delete)(LPOLEOBJECT);
249 OLESTATUS (CALLBACK *SetHostNames)(LPOLEOBJECT,LPCOLESTR16,LPCOLESTR16);
250 OLESTATUS (CALLBACK *SaveToStream)(LPOLEOBJECT,LPOLESTREAM);
251 OLESTATUS (CALLBACK *Clone)(LPOLEOBJECT,LPOLECLIENT,LHCLIENTDOC,LPCOLESTR16,LPOLEOBJECT *);
252 OLESTATUS (CALLBACK *CopyFromLink)(LPOLEOBJECT,LPOLECLIENT,LHCLIENTDOC,LPCOLESTR16,LPOLEOBJECT *);
253 OLESTATUS (CALLBACK *Equal)(LPOLEOBJECT,LPOLEOBJECT);
254 OLESTATUS (CALLBACK *CopyToClipBoard)(LPOLEOBJECT);
255 OLESTATUS (CALLBACK *Draw)(LPOLEOBJECT,HDC16,LPRECT16,LPRECT16,HDC16);
256 OLESTATUS (CALLBACK *Activate)(LPOLEOBJECT,UINT16,BOOL16,BOOL16,HWND16,LPRECT16);
257 OLESTATUS (CALLBACK *Execute)(LPOLEOBJECT,HGLOBAL16,UINT16);
258 OLESTATUS (CALLBACK *Close)(LPOLEOBJECT);
259 OLESTATUS (CALLBACK *Update)(LPOLEOBJECT);
260 OLESTATUS (CALLBACK *Reconnect)(LPOLEOBJECT);
261 OLESTATUS (CALLBACK *ObjectConvert)(LPOLEOBJECT,LPCOLESTR16,LPOLECLIENT,LHCLIENTDOC,LPCOLESTR16,LPOLEOBJECT*);
262 OLESTATUS (CALLBACK *GetLinkUpdateOptions)(LPOLEOBJECT,LPOLEOPT_UPDATE);
263 OLESTATUS (CALLBACK *SetLinkUpdateOptions)(LPOLEOBJECT,OLEOPT_UPDATE);
264 OLESTATUS (CALLBACK *Rename)(LPOLEOBJECT,LPCOLESTR16);
265 OLESTATUS (CALLBACK *QueryName)(LPOLEOBJECT,LPSTR,LPUINT16);
266 OLESTATUS (CALLBACK *QueryType)(LPOLEOBJECT,LPLONG);
267 OLESTATUS (CALLBACK *QueryBounds)(LPOLEOBJECT,LPRECT16);
268 OLESTATUS (CALLBACK *QuerySize)(LPOLEOBJECT,LPDWORD);
269 OLESTATUS (CALLBACK *QueryOpen)(LPOLEOBJECT);
270 OLESTATUS (CALLBACK *QueryOutOfDate)(LPOLEOBJECT);
271 OLESTATUS (CALLBACK *QueryReleaseStatus)(LPOLEOBJECT);
272 OLESTATUS (CALLBACK *QueryReleaseError)(LPOLEOBJECT);
273 OLE_RELEASE_METHOD (CALLBACK *QueryReleaseMethod)(LPOLEOBJECT);
274 OLESTATUS (CALLBACK *RequestData)(LPOLEOBJECT,OLECLIPFORMAT);
275 OLESTATUS (CALLBACK *ObjectLong)(LPOLEOBJECT,UINT16,LPLONG);
276 } OLEOBJECTVTBL;
277 typedef OLEOBJECTVTBL* LPOLEOBJECTVTBL;
279 typedef struct _OLEOBJECT {
280 LPOLEOBJECTVTBL lpvtbl;
281 } OLEOBJECT;
284 OLESTATUS WINAPI OleRegisterServer(LPCSTR,LPOLESERVER,LHSERVER *,HINSTANCE16,OLE_SERVER_USE);
285 OLESTATUS WINAPI OleUnblockServer(LHSERVER,BOOL16 *);
286 OLESTATUS WINAPI OleRegisterServerDoc(LHSERVER,LPCSTR,LPOLESERVERDOC,LHSERVERDOC *);
287 OLESTATUS WINAPI OleRegisterClientDoc(LPCSTR,LPCSTR,LONG,LHCLIENTDOC *);
288 OLESTATUS WINAPI OleRenameClientDoc(LHCLIENTDOC,LPCSTR);
289 OLESTATUS WINAPI OleRevokeServerDoc(LHSERVERDOC);
290 OLESTATUS WINAPI OleRevokeClientDoc(LHCLIENTDOC);
291 OLESTATUS WINAPI OleRevokeServer(LHSERVER);
293 /* com functions */
294 void WINAPI CoFreeUnusedLibraries(void);
295 HINSTANCE32 WINAPI CoLoadLibrary(LPSTR lpszLibName, BOOL32 bAutoFree);
296 void WINAPI CoFreeUnusedLibraries(void);
297 void WINAPI CoFreeAllLibraries(void);
299 typedef enum tagCALLCONV {
300 CC_CDECL = 1,
301 CC_MSCPASCAL = CC_CDECL + 1,
302 CC_PASCAL = CC_MSCPASCAL,
303 CC_MACPASCAL = CC_PASCAL + 1,
304 CC_STDCALL = CC_MACPASCAL + 1,
305 CC_RESERVED = CC_STDCALL + 1,
306 CC_SYSCALL = CC_RESERVED + 1,
307 CC_MPWCDECL = CC_SYSCALL + 1,
308 CC_MPWPASCAL = CC_MPWCDECL + 1,
309 CC_MAX = CC_MPWPASCAL + 1
310 } CALLCONV;
312 typedef struct tagPARAMDATA {
313 OLECHAR16 * szName; /* parameter name */
314 VARTYPE vt; /* parameter type */
315 } PARAMDATA, * LPPARAMDATA;
317 typedef struct tagMETHODDATA {
318 OLECHAR16 * szName; /* method name */
319 PARAMDATA * ppdata; /* pointer to an array of PARAMDATAs */
320 DISPID dispid; /* method ID */
321 UINT16 iMeth; /* method index */
322 CALLCONV cc; /* calling convention */
323 UINT16 cArgs; /* count of arguments */
324 WORD wFlags; /* same wFlags as on IDispatch::Invoke() */
325 VARTYPE vtReturn;
326 } METHODDATA, * LPMETHODDATA;
328 typedef struct tagINTERFACEDATA {
329 METHODDATA * pmethdata; /* pointer to an array of METHODDATAs */
330 UINT16 cMembers; /* count of members */
331 } INTERFACEDATA, * LPINTERFACEDATA;
334 #endif /* __WINE_OLE_H */