source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/ole.h@ 1180

Last change on this file since 1180 was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 13.3 KB
Line 
1/**
2 * This file is part of the mingw-w64 runtime package.
3 * No warranty is given; refer to the file DISCLAIMER within this package.
4 */
5#include <winapifamily.h>
6
7#ifndef _INC_OLE
8#define _INC_OLE
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
14#ifndef WINAPI
15#define WINAPI PASCAL
16#define CALLBACK PASCAL
17#define LPCSTR LPSTR
18#define LRESULT LONG_PTR
19#define HGLOBAL HANDLE
20#endif
21
22#ifdef STRICT
23#define OLE_LPCSTR LPCSTR
24#define OLE_CONST const
25#else
26#define OLE_LPCSTR LPSTR
27#define OLE_CONST
28#endif
29
30#define LRESULT LONG_PTR
31#define HGLOBAL HANDLE
32
33#define OT_LINK __MSABI_LONG(1)
34#define OT_EMBEDDED __MSABI_LONG(2)
35#define OT_STATIC __MSABI_LONG(3)
36
37#define OLEVERB_PRIMARY 0
38
39 typedef struct _OLETARGETDEVICE {
40 USHORT otdDeviceNameOffset;
41 USHORT otdDriverNameOffset;
42 USHORT otdPortNameOffset;
43 USHORT otdExtDevmodeOffset;
44 USHORT otdExtDevmodeSize;
45 USHORT otdEnvironmentOffset;
46 USHORT otdEnvironmentSize;
47 BYTE otdData[1];
48 } OLETARGETDEVICE;
49 typedef OLETARGETDEVICE *LPOLETARGETDEVICE;
50
51#define OF_SET 0x1
52#define OF_GET 0x2
53#define OF_HANDLER 0x4
54
55 typedef enum {
56 OLE_OK,
57 OLE_WAIT_FOR_RELEASE,
58 OLE_BUSY,
59 OLE_ERROR_PROTECT_ONLY,
60 OLE_ERROR_MEMORY,
61 OLE_ERROR_STREAM,
62 OLE_ERROR_STATIC,
63 OLE_ERROR_BLANK,
64 OLE_ERROR_DRAW,
65 OLE_ERROR_METAFILE,
66 OLE_ERROR_ABORT,
67 OLE_ERROR_CLIPBOARD,
68 OLE_ERROR_FORMAT,
69 OLE_ERROR_OBJECT,
70 OLE_ERROR_OPTION,
71 OLE_ERROR_PROTOCOL,
72 OLE_ERROR_ADDRESS,
73 OLE_ERROR_NOT_EQUAL,
74 OLE_ERROR_HANDLE,
75 OLE_ERROR_GENERIC,
76 OLE_ERROR_CLASS,
77 OLE_ERROR_SYNTAX,
78 OLE_ERROR_DATATYPE,
79 OLE_ERROR_PALETTE,
80 OLE_ERROR_NOT_LINK,
81 OLE_ERROR_NOT_EMPTY,
82 OLE_ERROR_SIZE,
83 OLE_ERROR_DRIVE,
84 OLE_ERROR_NETWORK,
85 OLE_ERROR_NAME,
86 OLE_ERROR_TEMPLATE,
87 OLE_ERROR_NEW,
88 OLE_ERROR_EDIT,
89 OLE_ERROR_OPEN,
90 OLE_ERROR_NOT_OPEN,
91 OLE_ERROR_LAUNCH,
92 OLE_ERROR_COMM,
93 OLE_ERROR_TERMINATE,
94 OLE_ERROR_COMMAND,
95 OLE_ERROR_SHOW,
96 OLE_ERROR_DOVERB,
97 OLE_ERROR_ADVISE_NATIVE,
98 OLE_ERROR_ADVISE_PICT,
99 OLE_ERROR_ADVISE_RENAME,
100 OLE_ERROR_POKE_NATIVE,
101 OLE_ERROR_REQUEST_NATIVE,
102 OLE_ERROR_REQUEST_PICT,
103 OLE_ERROR_SERVER_BLOCKED,
104 OLE_ERROR_REGISTRATION,
105 OLE_ERROR_ALREADY_REGISTERED,
106 OLE_ERROR_TASK,
107 OLE_ERROR_OUTOFDATE,
108 OLE_ERROR_CANT_UPDATE_CLIENT,
109 OLE_ERROR_UPDATE,
110 OLE_ERROR_SETDATA_FORMAT,
111 OLE_ERROR_STATIC_FROM_OTHER_OS,
112 OLE_ERROR_FILE_VER,
113 OLE_WARN_DELETE_DATA = 1000
114 } OLESTATUS;
115
116 typedef enum {
117 OLE_CHANGED,
118 OLE_SAVED,
119 OLE_CLOSED,
120 OLE_RENAMED,
121 OLE_QUERY_PAINT,
122 OLE_RELEASE,
123 OLE_QUERY_RETRY
124 } OLE_NOTIFICATION;
125
126 typedef enum {
127 OLE_NONE,
128 OLE_DELETE,
129 OLE_LNKPASTE,
130 OLE_EMBPASTE,
131 OLE_SHOW,
132 OLE_RUN,
133 OLE_ACTIVATE,
134 OLE_UPDATE,
135 OLE_CLOSE,
136 OLE_RECONNECT,
137 OLE_SETUPDATEOPTIONS,
138 OLE_SERVERUNLAUNCH,
139 OLE_LOADFROMSTREAM,
140 OLE_SETDATA,
141 OLE_REQUESTDATA,
142 OLE_OTHER,
143 OLE_CREATE,
144 OLE_CREATEFROMTEMPLATE,
145 OLE_CREATELINKFROMFILE,
146 OLE_COPYFROMLNK,
147 OLE_CREATEFROMFILE,
148 OLE_CREATEINVISIBLE
149 } OLE_RELEASE_METHOD;
150
151 typedef enum {
152 olerender_none,
153 olerender_draw,
154 olerender_format
155 } OLEOPT_RENDER;
156
157 typedef WORD OLECLIPFORMAT;
158
159 typedef enum {
160 oleupdate_always,
161 oleupdate_onsave,
162#ifdef OLE_INTERNAL
163 oleupdate_oncall,
164 oleupdate_onclose
165#else
166 oleupdate_oncall
167#endif
168 } OLEOPT_UPDATE;
169
170 typedef HANDLE HOBJECT;
171 typedef LONG_PTR LHSERVER;
172 typedef LONG_PTR LHCLIENTDOC;
173 typedef LONG_PTR LHSERVERDOC;
174 typedef struct _OLEOBJECT *LPOLEOBJECT;
175 typedef struct _OLESTREAM *LPOLESTREAM;
176 typedef struct _OLECLIENT *LPOLECLIENT;
177 typedef struct _OLEOBJECTVTBL {
178 void *(CALLBACK *QueryProtocol) (LPOLEOBJECT, OLE_LPCSTR);
179 OLESTATUS (CALLBACK *Release) (LPOLEOBJECT);
180 OLESTATUS (CALLBACK *Show) (LPOLEOBJECT, WINBOOL);
181 OLESTATUS (CALLBACK *DoVerb) (LPOLEOBJECT, UINT, WINBOOL, WINBOOL);
182 OLESTATUS (CALLBACK *GetData) (LPOLEOBJECT, OLECLIPFORMAT, HANDLE *);
183 OLESTATUS (CALLBACK *SetData) (LPOLEOBJECT, OLECLIPFORMAT, HANDLE);
184 OLESTATUS (CALLBACK *SetTargetDevice) (LPOLEOBJECT, HGLOBAL);
185 OLESTATUS (CALLBACK *SetBounds) (LPOLEOBJECT, OLE_CONST RECT *);
186 OLECLIPFORMAT (CALLBACK *EnumFormats) (LPOLEOBJECT, OLECLIPFORMAT);
187 OLESTATUS (CALLBACK *SetColorScheme) (LPOLEOBJECT, OLE_CONST LOGPALETTE *);
188#ifndef SERVERONLY
189 OLESTATUS (CALLBACK *Delete) (LPOLEOBJECT);
190 OLESTATUS (CALLBACK *SetHostNames) (LPOLEOBJECT, OLE_LPCSTR, OLE_LPCSTR);
191 OLESTATUS (CALLBACK *SaveToStream) (LPOLEOBJECT, LPOLESTREAM);
192 OLESTATUS (CALLBACK *Clone) (LPOLEOBJECT, LPOLECLIENT, LHCLIENTDOC, OLE_LPCSTR, LPOLEOBJECT *);
193 OLESTATUS (CALLBACK *CopyFromLink) (LPOLEOBJECT, LPOLECLIENT, LHCLIENTDOC, OLE_LPCSTR, LPOLEOBJECT *);
194 OLESTATUS (CALLBACK *Equal) (LPOLEOBJECT, LPOLEOBJECT);
195 OLESTATUS (CALLBACK *CopyToClipboard) (LPOLEOBJECT);
196 OLESTATUS (CALLBACK *Draw) (LPOLEOBJECT, HDC, OLE_CONST RECT *, OLE_CONST RECT *, HDC);
197 OLESTATUS (CALLBACK *Activate) (LPOLEOBJECT, UINT, WINBOOL, WINBOOL, HWND, OLE_CONST RECT *);
198 OLESTATUS (CALLBACK *Execute) (LPOLEOBJECT, HGLOBAL, UINT);
199 OLESTATUS (CALLBACK *Close) (LPOLEOBJECT);
200 OLESTATUS (CALLBACK *Update) (LPOLEOBJECT);
201 OLESTATUS (CALLBACK *Reconnect) (LPOLEOBJECT);
202 OLESTATUS (CALLBACK *ObjectConvert) (LPOLEOBJECT, OLE_LPCSTR, LPOLECLIENT, LHCLIENTDOC, OLE_LPCSTR, LPOLEOBJECT *);
203 OLESTATUS (CALLBACK *GetLinkUpdateOptions) (LPOLEOBJECT, OLEOPT_UPDATE *);
204 OLESTATUS (CALLBACK *SetLinkUpdateOptions) (LPOLEOBJECT, OLEOPT_UPDATE);
205 OLESTATUS (CALLBACK *Rename) (LPOLEOBJECT, OLE_LPCSTR);
206 OLESTATUS (CALLBACK *QueryName) (LPOLEOBJECT, LPSTR, UINT *);
207 OLESTATUS (CALLBACK *QueryType) (LPOLEOBJECT, LONG *);
208 OLESTATUS (CALLBACK *QueryBounds) (LPOLEOBJECT, RECT *);
209 OLESTATUS (CALLBACK *QuerySize) (LPOLEOBJECT, DWORD *);
210 OLESTATUS (CALLBACK *QueryOpen) (LPOLEOBJECT);
211 OLESTATUS (CALLBACK *QueryOutOfDate) (LPOLEOBJECT);
212 OLESTATUS (CALLBACK *QueryReleaseStatus) (LPOLEOBJECT);
213 OLESTATUS (CALLBACK *QueryReleaseError) (LPOLEOBJECT);
214 OLE_RELEASE_METHOD (CALLBACK *QueryReleaseMethod) (LPOLEOBJECT);
215 OLESTATUS (CALLBACK *RequestData) (LPOLEOBJECT, OLECLIPFORMAT);
216 OLESTATUS (CALLBACK *ObjectLong) (LPOLEOBJECT, UINT, LONG *);
217 OLESTATUS (CALLBACK *ChangeData) (LPOLEOBJECT, HANDLE, LPOLECLIENT, WINBOOL);
218#endif
219 } OLEOBJECTVTBL;
220
221 typedef OLEOBJECTVTBL *LPOLEOBJECTVTBL;
222#ifndef OLE_INTERNAL
223 typedef struct _OLEOBJECT {
224 LPOLEOBJECTVTBL lpvtbl;
225 } OLEOBJECT;
226#endif
227
228 typedef struct _OLECLIENTVTBL {
229 int (CALLBACK *CallBack) (LPOLECLIENT, OLE_NOTIFICATION, LPOLEOBJECT);
230 } OLECLIENTVTBL;
231
232 typedef OLECLIENTVTBL *LPOLECLIENTVTBL;
233
234 typedef struct _OLECLIENT {
235 LPOLECLIENTVTBL lpvtbl;
236 } OLECLIENT;
237
238 typedef struct _OLESTREAMVTBL {
239 DWORD (CALLBACK *Get) (LPOLESTREAM, void *, DWORD);
240 DWORD (CALLBACK *Put) (LPOLESTREAM, OLE_CONST void *, DWORD);
241 } OLESTREAMVTBL;
242 typedef OLESTREAMVTBL *LPOLESTREAMVTBL;
243
244 typedef struct _OLESTREAM {
245 LPOLESTREAMVTBL lpstbl;
246 } OLESTREAM;
247
248#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
249 OLESTATUS WINAPI OleDelete (LPOLEOBJECT);
250 OLESTATUS WINAPI OleRelease (LPOLEOBJECT);
251 OLESTATUS WINAPI OleSaveToStream (LPOLEOBJECT, LPOLESTREAM);
252 OLESTATUS WINAPI OleEqual (LPOLEOBJECT, LPOLEOBJECT);
253 OLESTATUS WINAPI OleCopyToClipboard (LPOLEOBJECT);
254 OLESTATUS WINAPI OleSetHostNames (LPOLEOBJECT, LPCSTR, LPCSTR);
255 OLESTATUS WINAPI OleSetTargetDevice (LPOLEOBJECT, HGLOBAL);
256 OLESTATUS WINAPI OleSetBounds (LPOLEOBJECT, const RECT *);
257 OLESTATUS WINAPI OleSetColorScheme (LPOLEOBJECT, const LOGPALETTE *);
258 OLESTATUS WINAPI OleQueryBounds (LPOLEOBJECT, RECT *);
259 OLESTATUS WINAPI OleQuerySize (LPOLEOBJECT, DWORD *);
260 OLESTATUS WINAPI OleDraw (LPOLEOBJECT, HDC, const RECT *, const RECT *, HDC);
261 OLESTATUS WINAPI OleQueryOpen (LPOLEOBJECT);
262 OLESTATUS WINAPI OleActivate (LPOLEOBJECT, UINT, WINBOOL, WINBOOL, HWND, const RECT *);
263 OLESTATUS WINAPI OleExecute (LPOLEOBJECT, HGLOBAL, UINT);
264 OLESTATUS WINAPI OleClose (LPOLEOBJECT);
265 OLESTATUS WINAPI OleUpdate (LPOLEOBJECT);
266 OLESTATUS WINAPI OleReconnect (LPOLEOBJECT);
267 OLESTATUS WINAPI OleGetLinkUpdateOptions (LPOLEOBJECT, OLEOPT_UPDATE *);
268 OLESTATUS WINAPI OleSetLinkUpdateOptions (LPOLEOBJECT, OLEOPT_UPDATE);
269 void *WINAPI OleQueryProtocol (LPOLEOBJECT, LPCSTR);
270 OLESTATUS WINAPI OleQueryReleaseStatus (LPOLEOBJECT);
271 OLESTATUS WINAPI OleQueryReleaseError (LPOLEOBJECT);
272 OLE_RELEASE_METHOD WINAPI OleQueryReleaseMethod (LPOLEOBJECT);
273 OLESTATUS WINAPI OleQueryType (LPOLEOBJECT, LONG *);
274 DWORD WINAPI OleQueryClientVersion (void);
275 DWORD WINAPI OleQueryServerVersion (void);
276 OLECLIPFORMAT WINAPI OleEnumFormats (LPOLEOBJECT, OLECLIPFORMAT);
277 OLESTATUS WINAPI OleGetData (LPOLEOBJECT, OLECLIPFORMAT, HANDLE *);
278 OLESTATUS WINAPI OleSetData (LPOLEOBJECT, OLECLIPFORMAT, HANDLE);
279 OLESTATUS WINAPI OleQueryOutOfDate (LPOLEOBJECT);
280 OLESTATUS WINAPI OleRequestData (LPOLEOBJECT, OLECLIPFORMAT);
281 OLESTATUS WINAPI OleQueryLinkFromClip (LPCSTR, OLEOPT_RENDER, OLECLIPFORMAT);
282 OLESTATUS WINAPI OleQueryCreateFromClip (LPCSTR, OLEOPT_RENDER, OLECLIPFORMAT);
283 OLESTATUS WINAPI OleCreateFromClip (LPCSTR, LPOLECLIENT, LHCLIENTDOC, LPCSTR, LPOLEOBJECT *, OLEOPT_RENDER, OLECLIPFORMAT);
284 OLESTATUS WINAPI OleCreateLinkFromClip (LPCSTR, LPOLECLIENT, LHCLIENTDOC, LPCSTR, LPOLEOBJECT *, OLEOPT_RENDER, OLECLIPFORMAT);
285 OLESTATUS WINAPI OleCreateFromFile (LPCSTR, LPOLECLIENT, LPCSTR, LPCSTR, LHCLIENTDOC, LPCSTR, LPOLEOBJECT *, OLEOPT_RENDER, OLECLIPFORMAT);
286 OLESTATUS WINAPI OleCreateLinkFromFile (LPCSTR, LPOLECLIENT, LPCSTR, LPCSTR, LPCSTR, LHCLIENTDOC, LPCSTR, LPOLEOBJECT *, OLEOPT_RENDER, OLECLIPFORMAT);
287 OLESTATUS WINAPI OleLoadFromStream (LPOLESTREAM, LPCSTR, LPOLECLIENT, LHCLIENTDOC, LPCSTR, LPOLEOBJECT *);
288 OLESTATUS WINAPI OleCreate (LPCSTR, LPOLECLIENT, LPCSTR, LHCLIENTDOC, LPCSTR, LPOLEOBJECT *, OLEOPT_RENDER, OLECLIPFORMAT);
289 OLESTATUS WINAPI OleCreateInvisible (LPCSTR, LPOLECLIENT, LPCSTR, LHCLIENTDOC, LPCSTR, LPOLEOBJECT *, OLEOPT_RENDER, OLECLIPFORMAT, WINBOOL);
290 OLESTATUS WINAPI OleCreateFromTemplate (LPCSTR, LPOLECLIENT, LPCSTR, LHCLIENTDOC, LPCSTR, LPOLEOBJECT *, OLEOPT_RENDER, OLECLIPFORMAT);
291 OLESTATUS WINAPI OleClone (LPOLEOBJECT, LPOLECLIENT, LHCLIENTDOC, LPCSTR, LPOLEOBJECT *);
292 OLESTATUS WINAPI OleCopyFromLink (LPOLEOBJECT, LPCSTR, LPOLECLIENT, LHCLIENTDOC, LPCSTR, LPOLEOBJECT *);
293 OLESTATUS WINAPI OleObjectConvert (LPOLEOBJECT, LPCSTR, LPOLECLIENT, LHCLIENTDOC, LPCSTR, LPOLEOBJECT *);
294 OLESTATUS WINAPI OleRename (LPOLEOBJECT, LPCSTR);
295 OLESTATUS WINAPI OleQueryName (LPOLEOBJECT lpobj, LPSTR lpBuf, UINT *lpcbBuf);
296 OLESTATUS WINAPI OleRevokeObject (LPOLECLIENT);
297 WINBOOL WINAPI OleIsDcMeta (HDC);
298 OLESTATUS WINAPI OleRegisterClientDoc (LPCSTR, LPCSTR, LONG, LHCLIENTDOC *);
299 OLESTATUS WINAPI OleRevokeClientDoc (LHCLIENTDOC);
300 OLESTATUS WINAPI OleRenameClientDoc (LHCLIENTDOC, LPCSTR);
301 OLESTATUS WINAPI OleRevertClientDoc (LHCLIENTDOC);
302 OLESTATUS WINAPI OleSavedClientDoc (LHCLIENTDOC);
303 OLESTATUS WINAPI OleEnumObjects (LHCLIENTDOC, LPOLEOBJECT *);
304
305 typedef enum {
306 OLE_SERVER_MULTI,
307 OLE_SERVER_SINGLE
308 } OLE_SERVER_USE;
309 typedef struct _OLESERVER *LPOLESERVER;
310
311 typedef struct _OLESERVERDOC *LPOLESERVERDOC;
312
313 OLESTATUS WINAPI OleRegisterServer (LPCSTR, LPOLESERVER, LHSERVER *, HINSTANCE, OLE_SERVER_USE);
314 OLESTATUS WINAPI OleRevokeServer (LHSERVER);
315 OLESTATUS WINAPI OleBlockServer (LHSERVER);
316 OLESTATUS WINAPI OleUnblockServer (LHSERVER, WINBOOL *);
317 OLESTATUS WINAPI OleLockServer (LPOLEOBJECT, LHSERVER *);
318 OLESTATUS WINAPI OleUnlockServer (LHSERVER);
319 OLESTATUS WINAPI OleRegisterServerDoc (LHSERVER, LPCSTR, LPOLESERVERDOC, LHSERVERDOC *);
320 OLESTATUS WINAPI OleRevokeServerDoc (LHSERVERDOC);
321 OLESTATUS WINAPI OleRenameServerDoc (LHSERVERDOC, LPCSTR);
322 OLESTATUS WINAPI OleRevertServerDoc (LHSERVERDOC);
323 OLESTATUS WINAPI OleSavedServerDoc (LHSERVERDOC);
324#endif
325
326 typedef struct _OLESERVERVTBL {
327 OLESTATUS (CALLBACK *Open) (LPOLESERVER, LHSERVERDOC, OLE_LPCSTR, LPOLESERVERDOC *);
328 OLESTATUS (CALLBACK *Create) (LPOLESERVER, LHSERVERDOC, OLE_LPCSTR, OLE_LPCSTR, LPOLESERVERDOC *);
329 OLESTATUS (CALLBACK *CreateFromTemplate) (LPOLESERVER, LHSERVERDOC, OLE_LPCSTR, OLE_LPCSTR, OLE_LPCSTR, LPOLESERVERDOC *);
330 OLESTATUS (CALLBACK *Edit) (LPOLESERVER, LHSERVERDOC, OLE_LPCSTR, OLE_LPCSTR, LPOLESERVERDOC *);
331 _Analysis_noreturn_ OLESTATUS (CALLBACK *Exit) (LPOLESERVER);
332 OLESTATUS (CALLBACK *Release) (LPOLESERVER);
333 OLESTATUS (CALLBACK *Execute) (LPOLESERVER, HGLOBAL);
334 } OLESERVERVTBL;
335 typedef OLESERVERVTBL *LPOLESERVERVTBL;
336
337 typedef struct _OLESERVER {
338 LPOLESERVERVTBL lpvtbl;
339 } OLESERVER;
340
341 typedef struct _OLESERVERDOCVTBL {
342 OLESTATUS (CALLBACK *Save) (LPOLESERVERDOC);
343 OLESTATUS (CALLBACK *Close) (LPOLESERVERDOC);
344 OLESTATUS (CALLBACK *SetHostNames) (LPOLESERVERDOC, OLE_LPCSTR, OLE_LPCSTR);
345 OLESTATUS (CALLBACK *SetDocDimensions) (LPOLESERVERDOC, OLE_CONST RECT *);
346 OLESTATUS (CALLBACK *GetObject) (LPOLESERVERDOC, OLE_LPCSTR, LPOLEOBJECT *, LPOLECLIENT);
347 OLESTATUS (CALLBACK *Release) (LPOLESERVERDOC);
348 OLESTATUS (CALLBACK *SetColorScheme) (LPOLESERVERDOC, OLE_CONST LOGPALETTE *);
349 OLESTATUS (CALLBACK *Execute) (LPOLESERVERDOC, HGLOBAL);
350 } OLESERVERDOCVTBL;
351 typedef OLESERVERDOCVTBL *LPOLESERVERDOCVTBL;
352
353 typedef struct _OLESERVERDOC {
354 LPOLESERVERDOCVTBL lpvtbl;
355 } OLESERVERDOC;
356
357#ifdef __cplusplus
358}
359#endif
360
361#endif
Note: See TracBrowser for help on using the repository browser.