4 #pragma GCC system_header
11 #define OLE_LPCSTR LPCSTR
12 #define OLE_CONST const
14 #define OLE_LPCSTR LPSTR
18 #define HGLOBAL HANDLE
20 #define OT_EMBEDDED 2L
22 #define OLEVERB_PRIMARY 0
27 typedef struct _OLETARGETDEVICE
{
28 USHORT otdDeviceNameOffset
;
29 USHORT otdDriverNameOffset
;
30 USHORT otdPortNameOffset
;
31 USHORT otdExtDevmodeOffset
;
32 USHORT otdExtDevmodeSize
;
33 USHORT otdEnvironmentOffset
;
34 USHORT otdEnvironmentSize
;
37 typedef OLETARGETDEVICE
*LPOLETARGETDEVICE
;
42 OLE_ERROR_PROTECT_ONLY
,
80 OLE_ERROR_ADVISE_NATIVE
,
81 OLE_ERROR_ADVISE_PICT
,
82 OLE_ERROR_ADVISE_RENAME
,
83 OLE_ERROR_POKE_NATIVE
,
84 OLE_ERROR_REQUEST_NATIVE
,
85 OLE_ERROR_REQUEST_PICT
,
86 OLE_ERROR_SERVER_BLOCKED
,
87 OLE_ERROR_REGISTRATION
,
88 OLE_ERROR_ALREADY_REGISTERED
,
91 OLE_ERROR_CANT_UPDATE_CLIENT
,
93 OLE_ERROR_SETDATA_FORMAT
,
94 OLE_ERROR_STATIC_FROM_OTHER_OS
,
96 OLE_WARN_DELETE_DATA
= 1000
118 OLE_SETUPDATEOPTIONS
,
125 OLE_CREATEFROMTEMPLATE
,
126 OLE_CREATELINKFROMFILE
,
130 } OLE_RELEASE_METHOD
;
136 typedef WORD OLECLIPFORMAT
;
147 typedef HANDLE HOBJECT
;
148 typedef LONG LHSERVER
;
149 typedef LONG LHCLIENTDOC
;
150 typedef LONG LHSERVERDOC
;
151 typedef struct _OLEOBJECT
*LPOLEOBJECT
;
152 typedef struct _OLESTREAM
*LPOLESTREAM
;
153 typedef struct _OLECLIENT
*LPOLECLIENT
;
154 typedef 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
*);
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
);
197 typedef OLEOBJECTVTBL
*LPOLEOBJECTVTBL
;
199 typedef struct _OLEOBJECT
{ LPOLEOBJECTVTBL lpvtbl
; } OLEOBJECT
;
201 typedef struct _OLECLIENTVTBL
{ int (CALLBACK
* CallBack
)(LPOLECLIENT
,OLE_NOTIFICATION
,LPOLEOBJECT
); } OLECLIENTVTBL
;
202 typedef OLECLIENTVTBL
*LPOLECLIENTVTBL
;
203 typedef struct _OLECLIENT
{ LPOLECLIENTVTBL lpvtbl
; } OLECLIENT
;
204 typedef struct _OLESTREAMVTBL
{
205 DWORD (CALLBACK
* Get
)(LPOLESTREAM
,void*,DWORD
);
206 DWORD (CALLBACK
* Put
)(LPOLESTREAM
,OLE_CONST
void*,DWORD
);
208 typedef OLESTREAMVTBL
*LPOLESTREAMVTBL
;
209 typedef struct _OLESTREAM
{ LPOLESTREAMVTBL lpstbl
; } OLESTREAM
;
214 typedef struct _OLESERVER
*LPOLESERVER
;
215 typedef struct _OLESERVERDOC
*LPOLESERVERDOC
;
216 typedef 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
);
225 typedef OLESERVERVTBL
*LPOLESERVERVTBL
;
226 typedef struct _OLESERVER
{ LPOLESERVERVTBL lpvtbl
; } OLESERVER
;
227 typedef 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
);
237 typedef OLESERVERDOCVTBL
*LPOLESERVERDOCVTBL
;
238 typedef struct _OLESERVERDOC
{ LPOLESERVERDOCVTBL lpvtbl
; } OLESERVERDOC
;
239 OLESTATUS WINAPI
OleDelete(LPOLEOBJECT
);
240 OLESTATUS WINAPI
OleRelease(LPOLEOBJECT
);
241 OLESTATUS WINAPI
OleSaveToStream(LPOLEOBJECT
,LPOLESTREAM
);
242 OLESTATUS WINAPI
OleEqual(LPOLEOBJECT
,LPOLEOBJECT
);
243 OLESTATUS WINAPI
OleCopyToClipboard(LPOLEOBJECT
);
244 OLESTATUS WINAPI
OleSetHostNames(LPOLEOBJECT
,LPCSTR
,LPCSTR
);
245 OLESTATUS WINAPI
OleSetTargetDevice(LPOLEOBJECT
,HGLOBAL
);
246 OLESTATUS WINAPI
OleSetBounds(LPOLEOBJECT
,LPCRECT
);
247 OLESTATUS WINAPI
OleSetColorScheme(LPOLEOBJECT
,const LOGPALETTE
*);
248 OLESTATUS WINAPI
OleQueryBounds(LPOLEOBJECT
,RECT
*);
249 OLESTATUS WINAPI
OleQuerySize(LPOLEOBJECT
,DWORD
*);
250 OLESTATUS WINAPI
OleDraw(LPOLEOBJECT
,HDC
,LPCRECT
,LPCRECT
,HDC
);
251 OLESTATUS WINAPI
OleQueryOpen(LPOLEOBJECT
);
252 OLESTATUS WINAPI
OleActivate(LPOLEOBJECT
,UINT
,BOOL
,BOOL
,HWND
,LPCRECT
);
253 OLESTATUS WINAPI
OleExecute(LPOLEOBJECT
,HGLOBAL
,UINT
);
254 OLESTATUS WINAPI
OleClose(LPOLEOBJECT
);
255 OLESTATUS WINAPI
OleUpdate(LPOLEOBJECT
);
256 OLESTATUS WINAPI
OleReconnect(LPOLEOBJECT
);
257 OLESTATUS WINAPI
OleGetLinkUpdateOptions(LPOLEOBJECT
,OLEOPT_UPDATE
*);
258 OLESTATUS WINAPI
OleSetLinkUpdateOptions(LPOLEOBJECT
,OLEOPT_UPDATE
);
259 WINAPI
void *OleQueryProtocol(LPOLEOBJECT
,LPCSTR
);
260 OLESTATUS WINAPI
OleQueryReleaseStatus(LPOLEOBJECT
);
261 OLESTATUS WINAPI
OleQueryReleaseError(LPOLEOBJECT
);
262 OLE_RELEASE_METHOD WINAPI
OleQueryReleaseMethod(LPOLEOBJECT
);
263 OLESTATUS WINAPI
OleQueryType(LPOLEOBJECT
,LONG
*);
264 DWORD WINAPI
OleQueryClientVersion(void);
265 DWORD WINAPI
OleQueryServerVersion(void);
266 OLECLIPFORMAT WINAPI
OleEnumFormats(LPOLEOBJECT
,OLECLIPFORMAT
);
267 OLESTATUS WINAPI
OleGetData(LPOLEOBJECT
,OLECLIPFORMAT
,HANDLE
*);
268 OLESTATUS WINAPI
OleSetData(LPOLEOBJECT
,OLECLIPFORMAT
,HANDLE
);
269 OLESTATUS WINAPI
OleQueryOutOfDate(LPOLEOBJECT
);
270 OLESTATUS WINAPI
OleRequestData(LPOLEOBJECT
,OLECLIPFORMAT
);
271 OLESTATUS WINAPI
OleQueryLinkFromClip(LPCSTR
,OLEOPT_RENDER
,OLECLIPFORMAT
);
272 OLESTATUS WINAPI
OleQueryCreateFromClip(LPCSTR
,OLEOPT_RENDER
,OLECLIPFORMAT
);
273 OLESTATUS WINAPI
OleCreateFromClip(LPCSTR
,LPOLECLIENT
,LHCLIENTDOC
,LPCSTR
,LPOLEOBJECT
*,OLEOPT_RENDER
,OLECLIPFORMAT
);
274 OLESTATUS WINAPI
OleCreateLinkFromClip(LPCSTR
,LPOLECLIENT
,LHCLIENTDOC
,LPCSTR
,LPOLEOBJECT
*,OLEOPT_RENDER
,OLECLIPFORMAT
);
275 OLESTATUS WINAPI
OleCreateFromFile(LPCSTR
,LPOLECLIENT
,LPCSTR
,LPCSTR
,LHCLIENTDOC
,LPCSTR
,LPOLEOBJECT
*,OLEOPT_RENDER
,OLECLIPFORMAT
);
276 OLESTATUS WINAPI
OleCreateLinkFromFile(LPCSTR
,LPOLECLIENT
,LPCSTR
,LPCSTR
,LPCSTR
,LHCLIENTDOC
,LPCSTR
,LPOLEOBJECT
*,OLEOPT_RENDER
,OLECLIPFORMAT
);
277 OLESTATUS WINAPI
OleLoadFromStream(LPOLESTREAM
,LPCSTR
,LPOLECLIENT
,LHCLIENTDOC
,LPCSTR
,LPOLEOBJECT
*);
278 OLESTATUS WINAPI
OleCreate(LPCSTR
,LPOLECLIENT
,LPCSTR
,LHCLIENTDOC
,LPCSTR
,LPOLEOBJECT
*,OLEOPT_RENDER
,OLECLIPFORMAT
);
279 OLESTATUS WINAPI
OleCreateInvisible(LPCSTR
,LPOLECLIENT
,LPCSTR
,LHCLIENTDOC
,LPCSTR
,LPOLEOBJECT
*,OLEOPT_RENDER
,OLECLIPFORMAT
,BOOL
);
280 OLESTATUS WINAPI
OleCreateFromTemplate(LPCSTR
,LPOLECLIENT
,LPCSTR
,LHCLIENTDOC
,LPCSTR
,LPOLEOBJECT
*,OLEOPT_RENDER
,OLECLIPFORMAT
);
281 OLESTATUS WINAPI
OleClone(LPOLEOBJECT
,LPOLECLIENT
,LHCLIENTDOC
,LPCSTR
,LPOLEOBJECT
*);
282 OLESTATUS WINAPI
OleCopyFromLink(LPOLEOBJECT
,LPCSTR
,LPOLECLIENT
,LHCLIENTDOC
,LPCSTR
,LPOLEOBJECT
*);
283 OLESTATUS WINAPI
OleObjectConvert(LPOLEOBJECT
,LPCSTR
,LPOLECLIENT
,LHCLIENTDOC
,LPCSTR
,LPOLEOBJECT
*);
284 OLESTATUS WINAPI
OleRename(LPOLEOBJECT
,LPCSTR
);
285 OLESTATUS WINAPI
OleQueryName(LPOLEOBJECT
,LPSTR
,UINT
*);
286 OLESTATUS WINAPI
OleRevokeObject(LPOLECLIENT
);
287 BOOL WINAPI
OleIsDcMeta(HDC
);
288 OLESTATUS WINAPI
OleRegisterClientDoc(LPCSTR
,LPCSTR
,LONG
,LHCLIENTDOC
*);
289 OLESTATUS WINAPI
OleRevokeClientDoc(LHCLIENTDOC
);
290 OLESTATUS WINAPI
OleRenameClientDoc(LHCLIENTDOC
,LPCSTR
);
291 OLESTATUS WINAPI
OleRevertClientDoc(LHCLIENTDOC
);
292 OLESTATUS WINAPI
OleSavedClientDoc(LHCLIENTDOC
);
293 OLESTATUS WINAPI
OleEnumObjects(LHCLIENTDOC
,LPOLEOBJECT
*);
294 OLESTATUS WINAPI
OleRegisterServer(LPCSTR
,LPOLESERVER
,LHSERVER
*,HINSTANCE
,OLE_SERVER_USE
);
295 OLESTATUS WINAPI
OleRevokeServer(LHSERVER
);
296 OLESTATUS WINAPI
OleBlockServer(LHSERVER
);
297 OLESTATUS WINAPI
OleUnblockServer(LHSERVER
,BOOL
*);
298 OLESTATUS WINAPI
OleLockServer(LPOLEOBJECT
,LHSERVER
*);
299 OLESTATUS WINAPI
OleUnlockServer(LHSERVER
);
300 OLESTATUS WINAPI
OleRegisterServerDoc(LHSERVER
,LPCSTR
,LPOLESERVERDOC
,LHSERVERDOC
*);
301 OLESTATUS WINAPI
OleRevokeServerDoc(LHSERVERDOC
);
302 OLESTATUS WINAPI
OleRenameServerDoc(LHSERVERDOC
,LPCSTR
);
303 OLESTATUS WINAPI
OleRevertServerDoc(LHSERVERDOC
);
304 OLESTATUS WINAPI
OleSavedServerDoc(LHSERVERDOC
);