2 * ole.h - Declarations for OLESVR and OLECLI
13 #include "wine/windef16.h"
14 #include "wine/obj_base.h"
15 #include "wine/obj_misc.h"
16 #include "wine/obj_storage.h"
17 #include "wine/obj_moniker.h"
18 #include "wine/obj_dataobject.h"
19 #include "wine/obj_dragdrop.h"
29 #define OLEVERB_PRIMARY 0
36 OLE_ERROR_PROTECT_ONLY
,
74 OLE_ERROR_ADVISE_NATIVE
,
75 OLE_ERROR_ADVISE_PICT
,
76 OLE_ERROR_ADVISE_RENAME
,
77 OLE_ERROR_POKE_NATIVE
,
78 OLE_ERROR_REQUEST_NATIVE
,
79 OLE_ERROR_REQUEST_PICT
,
80 OLE_ERROR_SERVER_BLOCKED
,
81 OLE_ERROR_REGISTRATION
,
82 OLE_ERROR_ALREADY_REGISTERED
,
85 OLE_ERROR_CANT_UPDATE_CLIENT
,
87 OLE_ERROR_SETDATA_FORMAT
,
88 OLE_ERROR_STATIC_FROM_OTHER_OS
,
89 OLE_WARN_DELETE_DATA
= 1000
120 typedef LONG LHSERVER
;
121 typedef LONG LHSERVERDOC
;
122 typedef LONG LHCLIENTDOC
;
123 typedef LONG OLECLIPFORMAT
;/* dunno about this type, please change/add */
124 typedef OLEOPT_UPDATE
* LPOLEOPT_UPDATE
;
128 OLE_DELETE
, /* delete object */
129 OLE_LNKPASTE
, /* link paste */
130 OLE_EMBPASTE
, /* paste(and update) */
137 OLE_SETUPDATEOPTIONS
,
138 OLE_SERVERRUNLAUNCH
, /* unlaunch (terminate?) server */
139 OLE_LOADFROMSTREAM
, /* (auto reconnect) */
140 OLE_SETDATA
, /* OleSetData */
141 OLE_REQUESTDATA
, /* OleRequestData */
144 OLE_CREATEFROMTEMPLATE
,
145 OLE_CREATELINKFROMFILE
,
149 } OLE_RELEASE_METHOD
;
151 typedef struct _OLETARGETDEVICE
{
152 UINT16 otdDeviceNameOffset
;
153 UINT16 otdDriverNameOffset
;
154 UINT16 otdPortNameOffset
;
155 UINT16 otdExtDevmodeOffset
;
156 UINT16 otdExtDevmodeSize
;
157 UINT16 otdEnvironmentOffset
;
158 UINT16 otdEnvironmentSize
;
163 typedef struct _OLESERVERDOC
* LPOLESERVERDOC
;
164 typedef struct _OLEOBJECT
* LPOLEOBJECT
;
165 typedef struct _OLECLIENT
* LPOLECLIENT
;
166 typedef struct _OLESERVERDOCVTBL
{
167 OLESTATUS
CALLBACK (*Save
)(LPOLESERVERDOC
);
168 OLESTATUS
CALLBACK (*Close
)(LPOLESERVERDOC
);
169 OLESTATUS
CALLBACK (*SetHostNames
)(LPOLESERVERDOC
,LPCOLESTR16
,LPCOLESTR16
);
170 OLESTATUS
CALLBACK (*SetDocDimensions
)(LPOLESERVERDOC
,LPRECT16
);
172 /* GetObject is a WINELIB_NAME macro so it cannot be used in Wine itself */
173 OLESTATUS
CALLBACK (*pGetObject
)(LPOLESERVERDOC
,LPCOLESTR16
,LPOLEOBJECT
*,LPOLECLIENT
);
175 OLESTATUS
CALLBACK (*GetObject
)(LPOLESERVERDOC
,LPCOLESTR16
,LPOLEOBJECT
*,LPOLECLIENT
);
177 OLESTATUS
CALLBACK (*Release
)(LPOLESERVERDOC
);
178 OLESTATUS
CALLBACK (*SetColorScheme
)(LPOLESERVERDOC
,struct tagLOGPALETTE
*);
179 OLESTATUS
CALLBACK (*Execute
)(LPOLESERVERDOC
,HGLOBAL16
);
181 typedef OLESERVERDOCVTBL
* LPOLESERVERDOCVTBL
;
182 typedef struct _OLESERVERDOC
{
183 LPOLESERVERDOCVTBL lpvtbl
;
184 /* server provided state info */
187 typedef struct _OLESERVER
* LPOLESERVER
;
188 typedef struct _OLESERVERVTBL
{
189 OLESTATUS
CALLBACK (*Open
)(LPOLESERVER
,LHSERVERDOC
,LPCOLESTR16
,LPOLESERVERDOC
*);
190 OLESTATUS
CALLBACK (*Create
)(LPOLESERVER
,LHSERVERDOC
,LPCOLESTR16
,LPCOLESTR16
,LPOLESERVERDOC
*);
191 OLESTATUS
CALLBACK (*CreateFromTemplate
)(LPOLESERVER
,LHSERVERDOC
,LPCOLESTR16
,LPCOLESTR16
,LPCOLESTR16
,LPOLESERVERDOC
*);
192 OLESTATUS
CALLBACK (*Edit
)(LPOLESERVER
,LHSERVERDOC
,LPCOLESTR16
,LPCOLESTR16
,LPOLESERVERDOC
*);
193 OLESTATUS
CALLBACK (*Exit
)(LPOLESERVER
);
194 OLESTATUS
CALLBACK (*Release
)(LPOLESERVER
);
195 OLESTATUS
CALLBACK (*Execute
)(LPOLESERVER
);
197 typedef OLESERVERVTBL
*LPOLESERVERVTBL
;
198 typedef struct _OLESERVER
{
199 LPOLESERVERVTBL lpvtbl
;
200 /* server specific data */
202 typedef struct _OLECLIENTVTBL
{
203 int CALLBACK (*CallBack
)(LPOLECLIENT
,OLE_NOTIFICATION
,LPOLEOBJECT
);
205 typedef OLECLIENTVTBL
*LPOLECLIENTVTBL
;
207 typedef struct _OLECLIENT
{
208 LPOLECLIENTVTBL lpvtbl
;
214 typedef struct _OLEOBJECTVTBL
{
215 void CALLBACK
*(*QueryProtocol
)(LPOLEOBJECT
,LPCOLESTR16
);
216 OLESTATUS
CALLBACK (*Release
)(LPOLEOBJECT
);
217 OLESTATUS
CALLBACK (*Show
)(LPOLEOBJECT
,BOOL16
);
218 OLESTATUS
CALLBACK (*DoVerb
)(LPOLEOBJECT
,UINT16
,BOOL16
,BOOL16
);
219 OLESTATUS
CALLBACK (*GetData
)(LPOLEOBJECT
,OLECLIPFORMAT
,HANDLE16
*);
220 OLESTATUS
CALLBACK (*SetData
)(LPOLEOBJECT
,OLECLIPFORMAT
,HANDLE16
);
221 OLESTATUS
CALLBACK (*SetTargetDevice
)(LPOLEOBJECT
,HGLOBAL16
);
222 OLESTATUS
CALLBACK (*SetBounds
)(LPOLEOBJECT
,LPRECT16
);
223 OLESTATUS
CALLBACK (*EnumFormats
)(LPOLEOBJECT
,OLECLIPFORMAT
);
224 OLESTATUS
CALLBACK (*SetColorScheme
)(LPOLEOBJECT
,struct tagLOGPALETTE
*);
225 OLESTATUS
CALLBACK (*Delete
)(LPOLEOBJECT
);
226 OLESTATUS
CALLBACK (*SetHostNames
)(LPOLEOBJECT
,LPCOLESTR16
,LPCOLESTR16
);
227 OLESTATUS
CALLBACK (*SaveToStream
)(LPOLEOBJECT
,struct _OLESTREAM
*);
228 OLESTATUS
CALLBACK (*Clone
)(LPOLEOBJECT
,LPOLECLIENT
,LHCLIENTDOC
,LPCOLESTR16
,LPOLEOBJECT
*);
229 OLESTATUS
CALLBACK (*CopyFromLink
)(LPOLEOBJECT
,LPOLECLIENT
,LHCLIENTDOC
,LPCOLESTR16
,LPOLEOBJECT
*);
230 OLESTATUS
CALLBACK (*Equal
)(LPOLEOBJECT
,LPOLEOBJECT
);
231 OLESTATUS
CALLBACK (*CopyToClipBoard
)(LPOLEOBJECT
);
232 OLESTATUS
CALLBACK (*Draw
)(LPOLEOBJECT
,HDC16
,LPRECT16
,LPRECT16
,HDC16
);
233 OLESTATUS
CALLBACK (*Activate
)(LPOLEOBJECT
,UINT16
,BOOL16
,BOOL16
,HWND16
,LPRECT16
);
234 OLESTATUS
CALLBACK (*Execute
)(LPOLEOBJECT
,HGLOBAL16
,UINT16
);
235 OLESTATUS
CALLBACK (*Close
)(LPOLEOBJECT
);
236 OLESTATUS
CALLBACK (*Update
)(LPOLEOBJECT
);
237 OLESTATUS
CALLBACK (*Reconnect
)(LPOLEOBJECT
);
238 OLESTATUS
CALLBACK (*ObjectConvert
)(LPOLEOBJECT
,LPCOLESTR16
,LPOLECLIENT
,LHCLIENTDOC
,LPCOLESTR16
,LPOLEOBJECT
*);
239 OLESTATUS
CALLBACK (*GetLinkUpdateOptions
)(LPOLEOBJECT
,LPOLEOPT_UPDATE
);
240 OLESTATUS
CALLBACK (*SetLinkUpdateOptions
)(LPOLEOBJECT
,OLEOPT_UPDATE
);
241 OLESTATUS
CALLBACK (*Rename
)(LPOLEOBJECT
,LPCOLESTR16
);
242 OLESTATUS
CALLBACK (*QueryName
)(LPOLEOBJECT
,LPSTR
,LPUINT16
);
243 OLESTATUS
CALLBACK (*QueryType
)(LPOLEOBJECT
,LPLONG
);
244 OLESTATUS
CALLBACK (*QueryBounds
)(LPOLEOBJECT
,LPRECT16
);
245 OLESTATUS
CALLBACK (*QuerySize
)(LPOLEOBJECT
,LPDWORD
);
246 OLESTATUS
CALLBACK (*QueryOpen
)(LPOLEOBJECT
);
247 OLESTATUS
CALLBACK (*QueryOutOfDate
)(LPOLEOBJECT
);
248 OLESTATUS
CALLBACK (*QueryReleaseStatus
)(LPOLEOBJECT
);
249 OLESTATUS
CALLBACK (*QueryReleaseError
)(LPOLEOBJECT
);
250 OLE_RELEASE_METHOD
CALLBACK (*QueryReleaseMethod
)(LPOLEOBJECT
);
251 OLESTATUS
CALLBACK (*RequestData
)(LPOLEOBJECT
,OLECLIPFORMAT
);
252 OLESTATUS
CALLBACK (*ObjectLong
)(LPOLEOBJECT
,UINT16
,LPLONG
);
254 typedef OLEOBJECTVTBL
* LPOLEOBJECTVTBL
;
256 typedef struct _OLEOBJECT
{
257 LPOLEOBJECTVTBL lpvtbl
;
261 typedef struct IMalloc16 IMalloc16
,*LPMALLOC16
;
263 #define ICOM_INTERFACE IMalloc16
264 #define IMalloc16_METHODS \
265 ICOM_METHOD1 (LPVOID,Alloc, DWORD,cb) \
266 ICOM_METHOD2 (LPVOID,Realloc, LPVOID,pv, DWORD,cb) \
267 ICOM_VMETHOD1( Free, LPVOID,pv) \
268 ICOM_METHOD1(DWORD, GetSize, LPVOID,pv) \
269 ICOM_METHOD1(INT16, DidAlloc, LPVOID,pv) \
270 ICOM_METHOD (LPVOID,HeapMinimize)
271 #define IMalloc16_IMETHODS \
274 ICOM_DEFINE(IMalloc16
,IUnknown
)
275 #undef ICOM_INTERFACE
277 /*** IUnknown methods ***/
278 #define IMalloc16_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
279 #define IMalloc16_AddRef(p) ICOM_CALL (AddRef,p)
280 #define IMalloc16_Release(p) ICOM_CALL (Release,p)
281 /*** IMalloc16 methods ***/
282 #define IMalloc16_Alloc(p,a) ICOM_CALL1(Alloc,p,a)
283 #define IMalloc16_Realloc(p,a,b) ICOM_CALL2(Realloc,p,a,b)
284 #define IMalloc16_Free(p,a) ICOM_CALL1(Free,p,a)
285 #define IMalloc16_GetSize(p,a) ICOM_CALL1(GetSize,p,a)
286 #define IMalloc16_DidAlloc(p,a) ICOM_CALL1(DidAlloc,p,a)
287 #define IMalloc16_HeapMinimize(p) ICOM_CALL (HeapMinimize,p)
290 HRESULT WINAPI
CoCreateStandardMalloc16(DWORD dwMemContext
, LPMALLOC16
* lpMalloc
);
291 HRESULT WINAPI
CoGetMalloc16(DWORD dwMemContext
,LPMALLOC16
* lpMalloc
);
292 HRESULT WINAPI
CoInitialize16(LPVOID lpReserved
);
293 HRESULT WINAPI
CoLockObjectExternal16(LPUNKNOWN
,BOOL16
,BOOL16
);
294 HRESULT WINAPI
CoRegisterClassObject16(REFCLSID
,LPUNKNOWN
,DWORD
,DWORD
,LPDWORD
);
295 void WINAPI
CoUninitialize16(void);
296 HRESULT WINAPI
DoDragDrop16(LPDATAOBJECT
,LPDROPSOURCE
,DWORD
,DWORD
*);
297 OLESTATUS WINAPI
OleRegisterServer16(LPCSTR
,LPOLESERVER
,LHSERVER
*,HINSTANCE16
,OLE_SERVER_USE
);
298 OLESTATUS WINAPI
OleUnblockServer16(LHSERVER
,BOOL16
*);
299 OLESTATUS WINAPI
OleRegisterServerDoc16(LHSERVER
,LPCSTR
,LPOLESERVERDOC
,LHSERVERDOC
*);
300 OLESTATUS WINAPI
OleRegisterClientDoc16(LPCSTR
,LPCSTR
,LONG
,LHCLIENTDOC
*);
301 OLESTATUS WINAPI
OleRenameClientDoc16(LHCLIENTDOC
,LPCSTR
);
302 OLESTATUS WINAPI
OleRevokeServerDoc16(LHSERVERDOC
);
303 OLESTATUS WINAPI
OleRevokeClientDoc16(LHCLIENTDOC
);
304 OLESTATUS WINAPI
OleRevokeServer16(LHSERVER
);
305 OLESTATUS WINAPI
OleRevertClientDoc16(LHCLIENTDOC hServerDoc
);
306 OLESTATUS WINAPI
OleEnumObjects16(LHCLIENTDOC hServerDoc
, SEGPTR data
);
307 OLESTATUS WINAPI
OleCreateLinkFromClip16(LPCSTR
,SEGPTR
,LHCLIENTDOC
,LPCSTR
,SEGPTR
,UINT16
,UINT16
);
308 OLESTATUS WINAPI
OleQueryLinkFromClip16(LPCSTR name
, UINT16 render
, UINT16 clipformat
);
309 OLESTATUS WINAPI
OleQueryCreateFromClip16(LPCSTR name
, UINT16 render
, UINT16 clipformat
);
310 OLESTATUS WINAPI
OleQueryType16(LPOLEOBJECT oleob
, SEGPTR xlong
);
311 OLESTATUS WINAPI
OleCreateFromClip16(LPCSTR
,SEGPTR
,LHCLIENTDOC
,LPCSTR
,SEGPTR
,UINT16
,UINT16
);
312 HRESULT WINAPI
RegisterDragDrop16(HWND16
,LPDROPTARGET
);
313 HRESULT WINAPI
RevokeDragDrop16(HWND16
);
315 BSTR16 WINAPI
SysAllocString16(LPCOLESTR16
);
316 INT16 WINAPI
SysReAllocString16(LPBSTR16
,LPCOLESTR16
);
317 VOID WINAPI
SysFreeString16(BSTR16
);
318 BSTR16 WINAPI
SysAllocStringLen16(const char*, int);
319 int WINAPI
SysReAllocStringLen16(BSTR16
*, const char*, int);
320 int WINAPI
SysStringLen16(BSTR16
);
326 #endif /* __WINE_OLE_H */