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 unsigned short VARTYPE
;
39 #define OLEVERB_PRIMARY 0
46 OLE_ERROR_PROTECT_ONLY
,
84 OLE_ERROR_ADVISE_NATIVE
,
85 OLE_ERROR_ADVISE_PICT
,
86 OLE_ERROR_ADVISE_RENAME
,
87 OLE_ERROR_POKE_NATIVE
,
88 OLE_ERROR_REQUEST_NATIVE
,
89 OLE_ERROR_REQUEST_PICT
,
90 OLE_ERROR_SERVER_BLOCKED
,
91 OLE_ERROR_REGISTRATION
,
92 OLE_ERROR_ALREADY_REGISTERED
,
95 OLE_ERROR_CANT_UPDATE_CLIENT
,
97 OLE_ERROR_SETDATA_FORMAT
,
98 OLE_ERROR_STATIC_FROM_OTHER_OS
,
99 OLE_WARN_DELETE_DATA
= 1000
130 typedef LONG LHSERVER
;
131 typedef LONG LHSERVERDOC
;
132 typedef LONG LHCLIENTDOC
;
133 typedef LONG OLECLIPFORMAT
;/* dunno about this type, please change/add */
134 typedef OLEOPT_UPDATE
* LPOLEOPT_UPDATE
;
138 OLE_DELETE
, /* delete object */
139 OLE_LNKPASTE
, /* link paste */
140 OLE_EMBPASTE
, /* paste(and update) */
147 OLE_SETUPDATEOPTIONS
,
148 OLE_SERVERRUNLAUNCH
, /* unlaunch (terminate?) server */
149 OLE_LOADFROMSTREAM
, /* (auto reconnect) */
150 OLE_SETDATA
, /* OleSetData */
151 OLE_REQUESTDATA
, /* OleRequestData */
154 OLE_CREATEFROMTEMPLATE
,
155 OLE_CREATELINKFROMFILE
,
159 } OLE_RELEASE_METHOD
;
161 typedef struct _OLETARGETDEVICE
{
162 UINT16 otdDeviceNameOffset
;
163 UINT16 otdDriverNameOffset
;
164 UINT16 otdPortNameOffset
;
165 UINT16 otdExtDevmodeOffset
;
166 UINT16 otdExtDevmodeSize
;
167 UINT16 otdEnvironmentOffset
;
168 UINT16 otdEnvironmentSize
;
172 typedef struct _OLESTREAM
* LPOLESTREAM
;
173 typedef struct _OLESTREAMVTBL
{
174 DWORD (CALLBACK
*Get
)(LPOLESTREAM
,LPSTR
,DWORD
);
175 DWORD (CALLBACK
*Put
)(LPOLESTREAM
,LPSTR
,DWORD
);
177 typedef OLESTREAMVTBL
* LPOLESTREAMVTBL
;
178 typedef struct _OLESTREAM
{
179 LPOLESTREAMVTBL lpstbl
;
181 typedef struct _OLESERVERDOC
* LPOLESERVERDOC
;
182 typedef struct _OLEOBJECT
* LPOLEOBJECT
;
183 typedef struct _OLECLIENT
* LPOLECLIENT
;
184 typedef struct _OLESERVERDOCVTBL
{
185 OLESTATUS (CALLBACK
*Save
)(LPOLESERVERDOC
);
186 OLESTATUS (CALLBACK
*Close
)(LPOLESERVERDOC
);
187 OLESTATUS (CALLBACK
*SetHostNames
)(LPOLESERVERDOC
,LPCOLESTR16
,LPCOLESTR16
);
188 OLESTATUS (CALLBACK
*SetDocDimensions
)(LPOLESERVERDOC
,LPRECT16
);
189 #undef GetObject /* FIXME */
190 OLESTATUS (CALLBACK
*GetObject
)(LPOLESERVERDOC
,LPCOLESTR16
,LPOLEOBJECT
*,LPOLECLIENT
);
191 OLESTATUS (CALLBACK
*Release
)(LPOLESERVERDOC
);
192 OLESTATUS (CALLBACK
*SetColorScheme
)(LPOLESERVERDOC
,LPLOGPALETTE
);
193 OLESTATUS (CALLBACK
*Execute
)(LPOLESERVERDOC
,HGLOBAL16
);
195 typedef OLESERVERDOCVTBL
* LPOLESERVERDOCVTBL
;
196 typedef struct _OLESERVERDOC
{
197 LPOLESERVERDOCVTBL lpvtbl
;
198 /* server provided state info */
201 typedef struct _OLESERVER
* LPOLESERVER
;
202 typedef struct _OLESERVERVTBL
{
203 OLESTATUS (CALLBACK
*Open
)(LPOLESERVER
,LHSERVERDOC
,LPCOLESTR16
,LPOLESERVERDOC
*);
204 OLESTATUS (CALLBACK
*Create
)(LPOLESERVER
,LHSERVERDOC
,LPCOLESTR16
,LPCOLESTR16
,LPOLESERVERDOC
*);
205 OLESTATUS (CALLBACK
*CreateFromTemplate
)(LPOLESERVER
,LHSERVERDOC
,LPCOLESTR16
,LPCOLESTR16
,LPCOLESTR16
,LPOLESERVERDOC
*);
206 OLESTATUS (CALLBACK
*Edit
)(LPOLESERVER
,LHSERVERDOC
,LPCOLESTR16
,LPCOLESTR16
,LPOLESERVERDOC
*);
207 OLESTATUS (CALLBACK
*Exit
)(LPOLESERVER
);
208 OLESTATUS (CALLBACK
*Release
)(LPOLESERVER
);
209 OLESTATUS (CALLBACK
*Execute
)(LPOLESERVER
);
211 typedef OLESERVERVTBL
*LPOLESERVERVTBL
;
212 typedef struct _OLESERVER
{
213 LPOLESERVERVTBL lpvtbl
;
214 /* server specific data */
216 typedef struct _OLECLIENTVTBL
{
217 int (CALLBACK
*CallBack
)(LPOLECLIENT
,OLE_NOTIFICATION
,LPOLEOBJECT
);
219 typedef OLECLIENTVTBL
*LPOLECLIENTVTBL
;
221 typedef struct _OLECLIENT
{
222 LPOLECLIENTVTBL lpvtbl
;
226 typedef struct _OLEOBJECTVTBL
{
227 void * (CALLBACK
*QueryProtocol
)(LPOLEOBJECT
,LPCOLESTR16
);
228 OLESTATUS (CALLBACK
*Release
)(LPOLEOBJECT
);
229 OLESTATUS (CALLBACK
*Show
)(LPOLEOBJECT
,BOOL16
);
230 OLESTATUS (CALLBACK
*DoVerb
)(LPOLEOBJECT
,UINT16
,BOOL16
,BOOL16
);
231 OLESTATUS (CALLBACK
*GetData
)(LPOLEOBJECT
,OLECLIPFORMAT
,HANDLE16
*);
232 OLESTATUS (CALLBACK
*SetData
)(LPOLEOBJECT
,OLECLIPFORMAT
,HANDLE16
);
233 OLESTATUS (CALLBACK
*SetTargetDevice
)(LPOLEOBJECT
,HGLOBAL16
);
234 OLESTATUS (CALLBACK
*SetBounds
)(LPOLEOBJECT
,LPRECT16
);
235 OLESTATUS (CALLBACK
*EnumFormats
)(LPOLEOBJECT
,OLECLIPFORMAT
);
236 OLESTATUS (CALLBACK
*SetColorScheme
)(LPOLEOBJECT
,LPLOGPALETTE
);
237 OLESTATUS (CALLBACK
*Delete
)(LPOLEOBJECT
);
238 OLESTATUS (CALLBACK
*SetHostNames
)(LPOLEOBJECT
,LPCOLESTR16
,LPCOLESTR16
);
239 OLESTATUS (CALLBACK
*SaveToStream
)(LPOLEOBJECT
,LPOLESTREAM
);
240 OLESTATUS (CALLBACK
*Clone
)(LPOLEOBJECT
,LPOLECLIENT
,LHCLIENTDOC
,LPCOLESTR16
,LPOLEOBJECT
*);
241 OLESTATUS (CALLBACK
*CopyFromLink
)(LPOLEOBJECT
,LPOLECLIENT
,LHCLIENTDOC
,LPCOLESTR16
,LPOLEOBJECT
*);
242 OLESTATUS (CALLBACK
*Equal
)(LPOLEOBJECT
,LPOLEOBJECT
);
243 OLESTATUS (CALLBACK
*CopyToClipBoard
)(LPOLEOBJECT
);
244 OLESTATUS (CALLBACK
*Draw
)(LPOLEOBJECT
,HDC16
,LPRECT16
,LPRECT16
,HDC16
);
245 OLESTATUS (CALLBACK
*Activate
)(LPOLEOBJECT
,UINT16
,BOOL16
,BOOL16
,HWND16
,LPRECT16
);
246 OLESTATUS (CALLBACK
*Execute
)(LPOLEOBJECT
,HGLOBAL16
,UINT16
);
247 OLESTATUS (CALLBACK
*Close
)(LPOLEOBJECT
);
248 OLESTATUS (CALLBACK
*Update
)(LPOLEOBJECT
);
249 OLESTATUS (CALLBACK
*Reconnect
)(LPOLEOBJECT
);
250 OLESTATUS (CALLBACK
*ObjectConvert
)(LPOLEOBJECT
,LPCOLESTR16
,LPOLECLIENT
,LHCLIENTDOC
,LPCOLESTR16
,LPOLEOBJECT
*);
251 OLESTATUS (CALLBACK
*GetLinkUpdateOptions
)(LPOLEOBJECT
,LPOLEOPT_UPDATE
);
252 OLESTATUS (CALLBACK
*SetLinkUpdateOptions
)(LPOLEOBJECT
,OLEOPT_UPDATE
);
253 OLESTATUS (CALLBACK
*Rename
)(LPOLEOBJECT
,LPCOLESTR16
);
254 OLESTATUS (CALLBACK
*QueryName
)(LPOLEOBJECT
,LPSTR
,LPUINT16
);
255 OLESTATUS (CALLBACK
*QueryType
)(LPOLEOBJECT
,LPLONG
);
256 OLESTATUS (CALLBACK
*QueryBounds
)(LPOLEOBJECT
,LPRECT16
);
257 OLESTATUS (CALLBACK
*QuerySize
)(LPOLEOBJECT
,LPDWORD
);
258 OLESTATUS (CALLBACK
*QueryOpen
)(LPOLEOBJECT
);
259 OLESTATUS (CALLBACK
*QueryOutOfDate
)(LPOLEOBJECT
);
260 OLESTATUS (CALLBACK
*QueryReleaseStatus
)(LPOLEOBJECT
);
261 OLESTATUS (CALLBACK
*QueryReleaseError
)(LPOLEOBJECT
);
262 OLE_RELEASE_METHOD (CALLBACK
*QueryReleaseMethod
)(LPOLEOBJECT
);
263 OLESTATUS (CALLBACK
*RequestData
)(LPOLEOBJECT
,OLECLIPFORMAT
);
264 OLESTATUS (CALLBACK
*ObjectLong
)(LPOLEOBJECT
,UINT16
,LPLONG
);
266 typedef OLEOBJECTVTBL
* LPOLEOBJECTVTBL
;
268 typedef struct _OLEOBJECT
{
269 LPOLEOBJECTVTBL lpvtbl
;
273 OLESTATUS WINAPI
OleRegisterServer(LPCSTR
,LPOLESERVER
,LHSERVER
*,HINSTANCE16
,OLE_SERVER_USE
);
274 OLESTATUS WINAPI
OleUnblockServer(LHSERVER
,BOOL16
*);
275 OLESTATUS WINAPI
OleRegisterServerDoc(LHSERVER
,LPCSTR
,LPOLESERVERDOC
,LHSERVERDOC
*);
276 OLESTATUS WINAPI
OleRegisterClientDoc(LPCSTR
,LPCSTR
,LONG
,LHCLIENTDOC
*);
277 OLESTATUS WINAPI
OleRenameClientDoc(LHCLIENTDOC
,LPCSTR
);
278 OLESTATUS WINAPI
OleRevokeServerDoc(LHSERVERDOC
);
279 OLESTATUS WINAPI
OleRevokeClientDoc(LHCLIENTDOC
);
280 OLESTATUS WINAPI
OleRevokeServer(LHSERVER
);
282 typedef enum tagCALLCONV
{
284 CC_MSCPASCAL
= CC_CDECL
+ 1,
285 CC_PASCAL
= CC_MSCPASCAL
,
286 CC_MACPASCAL
= CC_PASCAL
+ 1,
287 CC_STDCALL
= CC_MACPASCAL
+ 1,
288 CC_RESERVED
= CC_STDCALL
+ 1,
289 CC_SYSCALL
= CC_RESERVED
+ 1,
290 CC_MPWCDECL
= CC_SYSCALL
+ 1,
291 CC_MPWPASCAL
= CC_MPWCDECL
+ 1,
292 CC_MAX
= CC_MPWPASCAL
+ 1
295 typedef struct tagPARAMDATA
{
296 OLECHAR16
* szName
; /* parameter name */
297 VARTYPE vt
; /* parameter type */
298 } PARAMDATA
, * LPPARAMDATA
;
300 typedef struct tagMETHODDATA
{
301 OLECHAR16
* szName
; /* method name */
302 PARAMDATA
* ppdata
; /* pointer to an array of PARAMDATAs */
303 DISPID dispid
; /* method ID */
304 UINT16 iMeth
; /* method index */
305 CALLCONV cc
; /* calling convention */
306 UINT16 cArgs
; /* count of arguments */
307 WORD wFlags
; /* same wFlags as on IDispatch::Invoke() */
309 } METHODDATA
, * LPMETHODDATA
;
311 typedef struct tagINTERFACEDATA
{
312 METHODDATA
* pmethdata
; /* pointer to an array of METHODDATAs */
313 UINT16 cMembers
; /* count of members */
314 } INTERFACEDATA
, * LPINTERFACEDATA
;
317 #endif /* __WINE_OLE_H */