source: Daodan/MinGW/include/ole.h@ 1163

Last change on this file since 1163 was 1046, checked in by alloc, 8 years ago

Daodan: Added Windows MinGW and build batch file

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