2 * ole.h - Declarations for OLESVR and OLECLI
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
)
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,
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
;
50 #define OLEVERB_PRIMARY 0
57 OLE_ERROR_PROTECT_ONLY
,
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
,
106 OLE_ERROR_CANT_UPDATE_CLIENT
,
108 OLE_ERROR_SETDATA_FORMAT
,
109 OLE_ERROR_STATIC_FROM_OTHER_OS
,
110 OLE_WARN_DELETE_DATA
= 1000
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
;
149 OLE_DELETE
, /* delete object */
150 OLE_LNKPASTE
, /* link paste */
151 OLE_EMBPASTE
, /* paste(and update) */
158 OLE_SETUPDATEOPTIONS
,
159 OLE_SERVERRUNLAUNCH
, /* unlaunch (terminate?) server */
160 OLE_LOADFROMSTREAM
, /* (auto reconnect) */
161 OLE_SETDATA
, /* OleSetData */
162 OLE_REQUESTDATA
, /* OleRequestData */
165 OLE_CREATEFROMTEMPLATE
,
166 OLE_CREATELINKFROMFILE
,
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
;
183 typedef struct _OLESTREAM
* LPOLESTREAM
;
184 typedef struct _OLESTREAMVTBL
{
185 DWORD (CALLBACK
*Get
)(LPOLESTREAM
,LPSTR
,DWORD
);
186 DWORD (CALLBACK
*Put
)(LPOLESTREAM
,LPSTR
,DWORD
);
188 typedef OLESTREAMVTBL
* LPOLESTREAMVTBL
;
189 typedef struct _OLESTREAM
{
190 LPOLESTREAMVTBL lpstbl
;
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
);
206 typedef OLESERVERDOCVTBL
* LPOLESERVERDOCVTBL
;
207 typedef struct _OLESERVERDOC
{
208 LPOLESERVERDOCVTBL lpvtbl
;
209 /* server provided state info */
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
);
222 typedef OLESERVERVTBL
*LPOLESERVERVTBL
;
223 typedef struct _OLESERVER
{
224 LPOLESERVERVTBL lpvtbl
;
225 /* server specific data */
227 typedef struct _OLECLIENTVTBL
{
228 int (CALLBACK
*CallBack
)(LPOLECLIENT
,OLE_NOTIFICATION
,LPOLEOBJECT
);
230 typedef OLECLIENTVTBL
*LPOLECLIENTVTBL
;
232 typedef struct _OLECLIENT
{
233 LPOLECLIENTVTBL lpvtbl
;
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
);
277 typedef OLEOBJECTVTBL
* LPOLEOBJECTVTBL
;
279 typedef struct _OLEOBJECT
{
280 LPOLEOBJECTVTBL lpvtbl
;
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
);
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
{
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
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() */
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 */