source: trunk/include/win/ole.h@ 4

Last change on this file since 4 was 4, checked in by ktk, 26 years ago

Import

File size: 9.6 KB
Line 
1/* $Id: ole.h,v 1.1 1999-05-24 20:19:16 ktk Exp $ */
2
3/*
4 * ole.h - Declarations for OLESVR and OLECLI
5 */
6
7#ifndef __WINE_OLE_H
8#define __WINE_OLE_H
9
10#include "wingdi.h" /* LOGPALETTE */
11
12/* FIXME: we need to include wtypes.h mainly, it seems, because we need BSTR.
13 * Normally none of the APIs in ole.h depend on it. It is most likey that they should
14 * be moved to ole2.h (which includes objbase.h and thus wtypes.h) or some other
15 * OLE include
16 */
17#include "wtypes.h"
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
23/* object types */
24#define OT_LINK 1
25#define OT_EMBEDDED 2
26#define OT_STATIC 3
27
28/* activate verbs */
29#define OLEVERB_PRIMARY 0
30
31typedef enum
32{
33 OLE_OK,
34 OLE_WAIT_FOR_RELEASE,
35 OLE_BUSY,
36 OLE_ERROR_PROTECT_ONLY,
37 OLE_ERROR_MEMORY,
38 OLE_ERROR_STREAM,
39 OLE_ERROR_STATIC,
40 OLE_ERROR_BLANK,
41 OLE_ERROR_DRAW,
42 OLE_ERROR_METAFILE,
43 OLE_ERROR_ABORT,
44 OLE_ERROR_CLIPBOARD,
45 OLE_ERROR_FORMAT,
46 OLE_ERROR_OBJECT,
47 OLE_ERROR_OPTION,
48 OLE_ERROR_PROTOCOL,
49 OLE_ERROR_ADDRESS,
50 OLE_ERROR_NOT_EQUAL,
51 OLE_ERROR_HANDLE,
52 OLE_ERROR_GENERIC,
53 OLE_ERROR_CLASS,
54 OLE_ERROR_SYNTAX,
55 OLE_ERROR_DATATYPE,
56 OLE_ERROR_PALETTE,
57 OLE_ERROR_NOT_LINK,
58 OLE_ERROR_NOT_EMPTY,
59 OLE_ERROR_SIZE,
60 OLE_ERROR_DRIVE,
61 OLE_ERROR_NETWORK,
62 OLE_ERROR_NAME,
63 OLE_ERROR_TEMPLATE,
64 OLE_ERROR_NEW,
65 OLE_ERROR_EDIT,
66 OLE_ERROR_OPEN,
67 OLE_ERROR_NOT_OPEN,
68 OLE_ERROR_LAUNCH,
69 OLE_ERROR_COMM,
70 OLE_ERROR_TERMINATE,
71 OLE_ERROR_COMMAND,
72 OLE_ERROR_SHOW,
73 OLE_ERROR_DOVERB,
74 OLE_ERROR_ADVISE_NATIVE,
75 OLE_ERROR_ADVISE_PICT,
76 OLE_ERROR_ADVISE_RENAME,
77 OLE_ERROR_POKE_NATIVE,
78 OLE_ERROR_REQUEST_NATIVE,
79 OLE_ERROR_REQUEST_PICT,
80 OLE_ERROR_SERVER_BLOCKED,
81 OLE_ERROR_REGISTRATION,
82 OLE_ERROR_ALREADY_REGISTERED,
83 OLE_ERROR_TASK,
84 OLE_ERROR_OUTOFDATE,
85 OLE_ERROR_CANT_UPDATE_CLIENT,
86 OLE_ERROR_UPDATE,
87 OLE_ERROR_SETDATA_FORMAT,
88 OLE_ERROR_STATIC_FROM_OTHER_OS,
89 OLE_WARN_DELETE_DATA = 1000
90} OLESTATUS;
91
92typedef enum {
93 OLE_SERVER_MULTI,
94 OLE_SERVER_SINGLE
95} OLE_SERVER_USE;
96
97typedef enum {
98 OLE_CHANGED,
99 OLE_SAVED,
100 OLE_CLOSED,
101 OLE_RENAMED,
102 OLE_QUERY_PAINT,
103 OLE_RELEASE,
104 OLE_QUERY_RETRY
105} OLE_NOTIFICATION;
106
107typedef enum {
108 olerender_none,
109 olerender_draw,
110 olerender_format
111} OLEOPT_RENDER;
112
113typedef enum {
114 oleupdate_always,
115 oleupdate_onsave,
116 oleupdate_oncall,
117 oleupdate_onclose
118} OLEOPT_UPDATE;
119
120typedef LONG LHSERVER;
121typedef LONG LHSERVERDOC;
122typedef LONG LHCLIENTDOC;
123typedef LONG OLECLIPFORMAT;/* dunno about this type, please change/add */
124typedef OLEOPT_UPDATE* LPOLEOPT_UPDATE;
125
126typedef enum {
127 OLE_NONE, /* none */
128 OLE_DELETE, /* delete object */
129 OLE_LNKPASTE, /* link paste */
130 OLE_EMBPASTE, /* paste(and update) */
131 OLE_SHOW,
132 OLE_RUN,
133 OLE_ACTIVATE,
134 OLE_UPDATE,
135 OLE_CLOSE,
136 OLE_RECONNECT,
137 OLE_SETUPDATEOPTIONS,
138 OLE_SERVERRUNLAUNCH, /* unlaunch (terminate?) server */
139 OLE_LOADFROMSTREAM, /* (auto reconnect) */
140 OLE_SETDATA, /* OleSetData */
141 OLE_REQUESTDATA, /* OleRequestData */
142 OLE_OTHER,
143 OLE_CREATE,
144 OLE_CREATEFROMTEMPLATE,
145 OLE_CREATELINKFROMFILE,
146 OLE_COPYFROMLNK,
147 OLE_CREATREFROMFILE,
148 OLE_CREATEINVISIBLE
149} OLE_RELEASE_METHOD;
150
151typedef struct _OLETARGETDEVICE {
152 UINT16 otdDeviceNameOffset;
153 UINT16 otdDriverNameOffset;
154 UINT16 otdPortNameOffset;
155 UINT16 otdExtDevmodeOffset;
156 UINT16 otdExtDevmodeSize;
157 UINT16 otdEnvironmentOffset;
158 UINT16 otdEnvironmentSize;
159 BYTE otdData[1];
160 /* ... */
161} OLETARGETDEVICE;
162typedef struct _OLESTREAM* LPOLESTREAM;
163typedef struct _OLESTREAMVTBL {
164 DWORD (CALLBACK *Get)(LPOLESTREAM,LPSTR,DWORD);
165 DWORD (CALLBACK *Put)(LPOLESTREAM,LPSTR,DWORD);
166} OLESTREAMVTBL;
167typedef OLESTREAMVTBL* LPOLESTREAMVTBL;
168typedef struct _OLESTREAM {
169 LPOLESTREAMVTBL lpstbl;
170} OLESTREAM;
171typedef struct _OLESERVERDOC* LPOLESERVERDOC;
172typedef struct _OLEOBJECT* LPOLEOBJECT;
173typedef struct _OLECLIENT* LPOLECLIENT;
174typedef struct _OLESERVERDOCVTBL {
175 OLESTATUS (CALLBACK *Save)(LPOLESERVERDOC);
176 OLESTATUS (CALLBACK *Close)(LPOLESERVERDOC);
177 OLESTATUS (CALLBACK *SetHostNames)(LPOLESERVERDOC,LPCOLESTR16,LPCOLESTR16);
178 OLESTATUS (CALLBACK *SetDocDimensions)(LPOLESERVERDOC,LPRECT16);
179#ifdef __WINE__
180/* GetObject is a WINELIB_NAME macro so it cannot be used in Wine itself */
181 OLESTATUS (CALLBACK *pGetObject)(LPOLESERVERDOC,LPCOLESTR16,LPOLEOBJECT*,LPOLECLIENT);
182#else
183 OLESTATUS (CALLBACK *GetObject)(LPOLESERVERDOC,LPCOLESTR16,LPOLEOBJECT*,LPOLECLIENT);
184#endif
185 OLESTATUS (CALLBACK *Release)(LPOLESERVERDOC);
186 OLESTATUS (CALLBACK *SetColorScheme)(LPOLESERVERDOC,LPLOGPALETTE);
187 OLESTATUS (CALLBACK *Execute)(LPOLESERVERDOC,HGLOBAL16);
188} OLESERVERDOCVTBL;
189typedef OLESERVERDOCVTBL* LPOLESERVERDOCVTBL;
190typedef struct _OLESERVERDOC {
191 LPOLESERVERDOCVTBL lpvtbl;
192 /* server provided state info */
193} OLESERVERDOC;
194
195typedef struct _OLESERVER* LPOLESERVER;
196typedef struct _OLESERVERVTBL {
197 OLESTATUS (CALLBACK *Open)(LPOLESERVER,LHSERVERDOC,LPCOLESTR16,LPOLESERVERDOC *);
198 OLESTATUS (CALLBACK *Create)(LPOLESERVER,LHSERVERDOC,LPCOLESTR16,LPCOLESTR16,LPOLESERVERDOC*);
199 OLESTATUS (CALLBACK *CreateFromTemplate)(LPOLESERVER,LHSERVERDOC,LPCOLESTR16,LPCOLESTR16,LPCOLESTR16,LPOLESERVERDOC *);
200 OLESTATUS (CALLBACK *Edit)(LPOLESERVER,LHSERVERDOC,LPCOLESTR16,LPCOLESTR16,LPOLESERVERDOC *);
201 OLESTATUS (CALLBACK *Exit)(LPOLESERVER);
202 OLESTATUS (CALLBACK *Release)(LPOLESERVER);
203 OLESTATUS (CALLBACK *Execute)(LPOLESERVER);
204} OLESERVERVTBL;
205typedef OLESERVERVTBL *LPOLESERVERVTBL;
206typedef struct _OLESERVER {
207 LPOLESERVERVTBL lpvtbl;
208 /* server specific data */
209} OLESERVER;
210typedef struct _OLECLIENTVTBL {
211 int (CALLBACK *CallBack)(LPOLECLIENT,OLE_NOTIFICATION,LPOLEOBJECT);
212} OLECLIENTVTBL;
213typedef OLECLIENTVTBL *LPOLECLIENTVTBL;
214
215typedef struct _OLECLIENT {
216 LPOLECLIENTVTBL lpvtbl;
217 /* client data... */
218} OLECLIENT;
219
220typedef struct _OLEOBJECTVTBL {
221 void * (CALLBACK *QueryProtocol)(LPOLEOBJECT,LPCOLESTR16);
222 OLESTATUS (CALLBACK *Release)(LPOLEOBJECT);
223 OLESTATUS (CALLBACK *Show)(LPOLEOBJECT,BOOL16);
224 OLESTATUS (CALLBACK *DoVerb)(LPOLEOBJECT,UINT16,BOOL16,BOOL16);
225 OLESTATUS (CALLBACK *GetData)(LPOLEOBJECT,OLECLIPFORMAT,HANDLE16 *);
226 OLESTATUS (CALLBACK *SetData)(LPOLEOBJECT,OLECLIPFORMAT,HANDLE16);
227 OLESTATUS (CALLBACK *SetTargetDevice)(LPOLEOBJECT,HGLOBAL16);
228 OLESTATUS (CALLBACK *SetBounds)(LPOLEOBJECT,LPRECT16);
229 OLESTATUS (CALLBACK *EnumFormats)(LPOLEOBJECT,OLECLIPFORMAT);
230 OLESTATUS (CALLBACK *SetColorScheme)(LPOLEOBJECT,LPLOGPALETTE);
231 OLESTATUS (CALLBACK *Delete)(LPOLEOBJECT);
232 OLESTATUS (CALLBACK *SetHostNames)(LPOLEOBJECT,LPCOLESTR16,LPCOLESTR16);
233 OLESTATUS (CALLBACK *SaveToStream)(LPOLEOBJECT,LPOLESTREAM);
234 OLESTATUS (CALLBACK *Clone)(LPOLEOBJECT,LPOLECLIENT,LHCLIENTDOC,LPCOLESTR16,LPOLEOBJECT *);
235 OLESTATUS (CALLBACK *CopyFromLink)(LPOLEOBJECT,LPOLECLIENT,LHCLIENTDOC,LPCOLESTR16,LPOLEOBJECT *);
236 OLESTATUS (CALLBACK *Equal)(LPOLEOBJECT,LPOLEOBJECT);
237 OLESTATUS (CALLBACK *CopyToClipBoard)(LPOLEOBJECT);
238 OLESTATUS (CALLBACK *Draw)(LPOLEOBJECT,HDC16,LPRECT16,LPRECT16,HDC16);
239 OLESTATUS (CALLBACK *Activate)(LPOLEOBJECT,UINT16,BOOL16,BOOL16,HWND16,LPRECT16);
240 OLESTATUS (CALLBACK *Execute)(LPOLEOBJECT,HGLOBAL16,UINT16);
241 OLESTATUS (CALLBACK *Close)(LPOLEOBJECT);
242 OLESTATUS (CALLBACK *Update)(LPOLEOBJECT);
243 OLESTATUS (CALLBACK *Reconnect)(LPOLEOBJECT);
244 OLESTATUS (CALLBACK *ObjectConvert)(LPOLEOBJECT,LPCOLESTR16,LPOLECLIENT,LHCLIENTDOC,LPCOLESTR16,LPOLEOBJECT*);
245 OLESTATUS (CALLBACK *GetLinkUpdateOptions)(LPOLEOBJECT,LPOLEOPT_UPDATE);
246 OLESTATUS (CALLBACK *SetLinkUpdateOptions)(LPOLEOBJECT,OLEOPT_UPDATE);
247 OLESTATUS (CALLBACK *Rename)(LPOLEOBJECT,LPCOLESTR16);
248 OLESTATUS (CALLBACK *QueryName)(LPOLEOBJECT,LPSTR,LPUINT16);
249 OLESTATUS (CALLBACK *QueryType)(LPOLEOBJECT,LPLONG);
250 OLESTATUS (CALLBACK *QueryBounds)(LPOLEOBJECT,LPRECT16);
251 OLESTATUS (CALLBACK *QuerySize)(LPOLEOBJECT,LPDWORD);
252 OLESTATUS (CALLBACK *QueryOpen)(LPOLEOBJECT);
253 OLESTATUS (CALLBACK *QueryOutOfDate)(LPOLEOBJECT);
254 OLESTATUS (CALLBACK *QueryReleaseStatus)(LPOLEOBJECT);
255 OLESTATUS (CALLBACK *QueryReleaseError)(LPOLEOBJECT);
256 OLE_RELEASE_METHOD (CALLBACK *QueryReleaseMethod)(LPOLEOBJECT);
257 OLESTATUS (CALLBACK *RequestData)(LPOLEOBJECT,OLECLIPFORMAT);
258 OLESTATUS (CALLBACK *ObjectLong)(LPOLEOBJECT,UINT16,LPLONG);
259} OLEOBJECTVTBL;
260typedef OLEOBJECTVTBL* LPOLEOBJECTVTBL;
261
262typedef struct _OLEOBJECT {
263 LPOLEOBJECTVTBL lpvtbl;
264} OLEOBJECT;
265
266
267OLESTATUS WINAPI OleRegisterServer16(LPCSTR,LPOLESERVER,LHSERVER *,HINSTANCE16,OLE_SERVER_USE);
268OLESTATUS WINAPI OleUnblockServer16(LHSERVER,BOOL16 *);
269OLESTATUS WINAPI OleRegisterServerDoc16(LHSERVER,LPCSTR,LPOLESERVERDOC,LHSERVERDOC *);
270OLESTATUS WINAPI OleRegisterClientDoc16(LPCSTR,LPCSTR,LONG,LHCLIENTDOC *);
271OLESTATUS WINAPI OleRenameClientDoc16(LHCLIENTDOC,LPCSTR);
272OLESTATUS WINAPI OleRevokeServerDoc16(LHSERVERDOC);
273OLESTATUS WINAPI OleRevokeClientDoc16(LHCLIENTDOC);
274OLESTATUS WINAPI OleRevokeServer16(LHSERVER);
275OLESTATUS WINAPI OleRevertClientDoc16(LHCLIENTDOC hServerDoc);
276OLESTATUS WINAPI OleEnumObjects16(LHCLIENTDOC hServerDoc, SEGPTR data);
277OLESTATUS WINAPI OleCreateLinkFromClip16(
278 LPCSTR name, LPOLECLIENT olecli, LHCLIENTDOC hclientdoc, LPCSTR xname,
279 LPOLEOBJECT *lpoleob, UINT16 render, UINT16 clipformat);
280OLESTATUS WINAPI OleQueryLinkFromClip16(LPCSTR name, UINT16 render, UINT16 clipformat);
281OLESTATUS WINAPI OleQueryCreateFromClip16(LPCSTR name, UINT16 render, UINT16 clipformat);
282OLESTATUS WINAPI OleQueryType16(LPOLEOBJECT oleob, SEGPTR xlong);
283OLESTATUS WINAPI OleCreateFromClip16(
284 LPCSTR name, LPOLECLIENT olecli, LHCLIENTDOC hclientdoc, LPCSTR xname,
285 LPOLEOBJECT *lpoleob, UINT16 render, UINT16 clipformat);
286
287/* com functions */
288void WINAPI CoFreeUnusedLibraries(void);
289HINSTANCE WINAPI CoLoadLibrary(LPSTR lpszLibName, BOOL bAutoFree);
290void WINAPI CoFreeUnusedLibraries(void);
291void WINAPI CoFreeAllLibraries(void);
292
293#ifdef __cplusplus
294} /*extern*/
295#endif
296
297#endif /* __WINE_OLE_H */
Note: See TracBrowser for help on using the repository browser.