2 * ole.h - Declarations for OLESVR and OLECLI
8 #include "wingdi.h" /* LOGPALETTE */
10 /* FIXME: we need to include wtypes.h mainly, it seems, because we need BSTR.
11 * Normally none of the APIs in ole.h depend on it. It is most likey that they should
12 * be moved to ole2.h (which includes objbase.h and thus wtypes.h) or some other
27 #define OLEVERB_PRIMARY 0
34 OLE_ERROR_PROTECT_ONLY
,
72 OLE_ERROR_ADVISE_NATIVE
,
73 OLE_ERROR_ADVISE_PICT
,
74 OLE_ERROR_ADVISE_RENAME
,
75 OLE_ERROR_POKE_NATIVE
,
76 OLE_ERROR_REQUEST_NATIVE
,
77 OLE_ERROR_REQUEST_PICT
,
78 OLE_ERROR_SERVER_BLOCKED
,
79 OLE_ERROR_REGISTRATION
,
80 OLE_ERROR_ALREADY_REGISTERED
,
83 OLE_ERROR_CANT_UPDATE_CLIENT
,
85 OLE_ERROR_SETDATA_FORMAT
,
86 OLE_ERROR_STATIC_FROM_OTHER_OS
,
87 OLE_WARN_DELETE_DATA
= 1000
118 typedef LONG LHSERVER
;
119 typedef LONG LHSERVERDOC
;
120 typedef LONG LHCLIENTDOC
;
121 typedef LONG OLECLIPFORMAT
;/* dunno about this type, please change/add */
122 typedef OLEOPT_UPDATE
* LPOLEOPT_UPDATE
;
126 OLE_DELETE
, /* delete object */
127 OLE_LNKPASTE
, /* link paste */
128 OLE_EMBPASTE
, /* paste(and update) */
135 OLE_SETUPDATEOPTIONS
,
136 OLE_SERVERRUNLAUNCH
, /* unlaunch (terminate?) server */
137 OLE_LOADFROMSTREAM
, /* (auto reconnect) */
138 OLE_SETDATA
, /* OleSetData */
139 OLE_REQUESTDATA
, /* OleRequestData */
142 OLE_CREATEFROMTEMPLATE
,
143 OLE_CREATELINKFROMFILE
,
147 } OLE_RELEASE_METHOD
;
149 typedef struct _OLETARGETDEVICE
{
150 UINT16 otdDeviceNameOffset
;
151 UINT16 otdDriverNameOffset
;
152 UINT16 otdPortNameOffset
;
153 UINT16 otdExtDevmodeOffset
;
154 UINT16 otdExtDevmodeSize
;
155 UINT16 otdEnvironmentOffset
;
156 UINT16 otdEnvironmentSize
;
160 typedef struct _OLESTREAM
* LPOLESTREAM
;
161 typedef struct _OLESTREAMVTBL
{
162 DWORD (CALLBACK
*Get
)(LPOLESTREAM
,LPSTR
,DWORD
);
163 DWORD (CALLBACK
*Put
)(LPOLESTREAM
,LPSTR
,DWORD
);
165 typedef OLESTREAMVTBL
* LPOLESTREAMVTBL
;
166 typedef struct _OLESTREAM
{
167 LPOLESTREAMVTBL lpstbl
;
169 typedef struct _OLESERVERDOC
* LPOLESERVERDOC
;
170 typedef struct _OLEOBJECT
* LPOLEOBJECT
;
171 typedef struct _OLECLIENT
* LPOLECLIENT
;
172 typedef struct _OLESERVERDOCVTBL
{
173 OLESTATUS (CALLBACK
*Save
)(LPOLESERVERDOC
);
174 OLESTATUS (CALLBACK
*Close
)(LPOLESERVERDOC
);
175 OLESTATUS (CALLBACK
*SetHostNames
)(LPOLESERVERDOC
,LPCOLESTR16
,LPCOLESTR16
);
176 OLESTATUS (CALLBACK
*SetDocDimensions
)(LPOLESERVERDOC
,LPRECT16
);
178 /* GetObject is a WINELIB_NAME macro so it cannot be used in Wine itself */
179 OLESTATUS (CALLBACK
*pGetObject
)(LPOLESERVERDOC
,LPCOLESTR16
,LPOLEOBJECT
*,LPOLECLIENT
);
181 OLESTATUS (CALLBACK
*GetObject
)(LPOLESERVERDOC
,LPCOLESTR16
,LPOLEOBJECT
*,LPOLECLIENT
);
183 OLESTATUS (CALLBACK
*Release
)(LPOLESERVERDOC
);
184 OLESTATUS (CALLBACK
*SetColorScheme
)(LPOLESERVERDOC
,LPLOGPALETTE
);
185 OLESTATUS (CALLBACK
*Execute
)(LPOLESERVERDOC
,HGLOBAL16
);
187 typedef OLESERVERDOCVTBL
* LPOLESERVERDOCVTBL
;
188 typedef struct _OLESERVERDOC
{
189 LPOLESERVERDOCVTBL lpvtbl
;
190 /* server provided state info */
193 typedef struct _OLESERVER
* LPOLESERVER
;
194 typedef struct _OLESERVERVTBL
{
195 OLESTATUS (CALLBACK
*Open
)(LPOLESERVER
,LHSERVERDOC
,LPCOLESTR16
,LPOLESERVERDOC
*);
196 OLESTATUS (CALLBACK
*Create
)(LPOLESERVER
,LHSERVERDOC
,LPCOLESTR16
,LPCOLESTR16
,LPOLESERVERDOC
*);
197 OLESTATUS (CALLBACK
*CreateFromTemplate
)(LPOLESERVER
,LHSERVERDOC
,LPCOLESTR16
,LPCOLESTR16
,LPCOLESTR16
,LPOLESERVERDOC
*);
198 OLESTATUS (CALLBACK
*Edit
)(LPOLESERVER
,LHSERVERDOC
,LPCOLESTR16
,LPCOLESTR16
,LPOLESERVERDOC
*);
199 OLESTATUS (CALLBACK
*Exit
)(LPOLESERVER
);
200 OLESTATUS (CALLBACK
*Release
)(LPOLESERVER
);
201 OLESTATUS (CALLBACK
*Execute
)(LPOLESERVER
);
203 typedef OLESERVERVTBL
*LPOLESERVERVTBL
;
204 typedef struct _OLESERVER
{
205 LPOLESERVERVTBL lpvtbl
;
206 /* server specific data */
208 typedef struct _OLECLIENTVTBL
{
209 int (CALLBACK
*CallBack
)(LPOLECLIENT
,OLE_NOTIFICATION
,LPOLEOBJECT
);
211 typedef OLECLIENTVTBL
*LPOLECLIENTVTBL
;
213 typedef struct _OLECLIENT
{
214 LPOLECLIENTVTBL lpvtbl
;
218 typedef struct _OLEOBJECTVTBL
{
219 void * (CALLBACK
*QueryProtocol
)(LPOLEOBJECT
,LPCOLESTR16
);
220 OLESTATUS (CALLBACK
*Release
)(LPOLEOBJECT
);
221 OLESTATUS (CALLBACK
*Show
)(LPOLEOBJECT
,BOOL16
);
222 OLESTATUS (CALLBACK
*DoVerb
)(LPOLEOBJECT
,UINT16
,BOOL16
,BOOL16
);
223 OLESTATUS (CALLBACK
*GetData
)(LPOLEOBJECT
,OLECLIPFORMAT
,HANDLE16
*);
224 OLESTATUS (CALLBACK
*SetData
)(LPOLEOBJECT
,OLECLIPFORMAT
,HANDLE16
);
225 OLESTATUS (CALLBACK
*SetTargetDevice
)(LPOLEOBJECT
,HGLOBAL16
);
226 OLESTATUS (CALLBACK
*SetBounds
)(LPOLEOBJECT
,LPRECT16
);
227 OLESTATUS (CALLBACK
*EnumFormats
)(LPOLEOBJECT
,OLECLIPFORMAT
);
228 OLESTATUS (CALLBACK
*SetColorScheme
)(LPOLEOBJECT
,LPLOGPALETTE
);
229 OLESTATUS (CALLBACK
*Delete
)(LPOLEOBJECT
);
230 OLESTATUS (CALLBACK
*SetHostNames
)(LPOLEOBJECT
,LPCOLESTR16
,LPCOLESTR16
);
231 OLESTATUS (CALLBACK
*SaveToStream
)(LPOLEOBJECT
,LPOLESTREAM
);
232 OLESTATUS (CALLBACK
*Clone
)(LPOLEOBJECT
,LPOLECLIENT
,LHCLIENTDOC
,LPCOLESTR16
,LPOLEOBJECT
*);
233 OLESTATUS (CALLBACK
*CopyFromLink
)(LPOLEOBJECT
,LPOLECLIENT
,LHCLIENTDOC
,LPCOLESTR16
,LPOLEOBJECT
*);
234 OLESTATUS (CALLBACK
*Equal
)(LPOLEOBJECT
,LPOLEOBJECT
);
235 OLESTATUS (CALLBACK
*CopyToClipBoard
)(LPOLEOBJECT
);
236 OLESTATUS (CALLBACK
*Draw
)(LPOLEOBJECT
,HDC16
,LPRECT16
,LPRECT16
,HDC16
);
237 OLESTATUS (CALLBACK
*Activate
)(LPOLEOBJECT
,UINT16
,BOOL16
,BOOL16
,HWND16
,LPRECT16
);
238 OLESTATUS (CALLBACK
*Execute
)(LPOLEOBJECT
,HGLOBAL16
,UINT16
);
239 OLESTATUS (CALLBACK
*Close
)(LPOLEOBJECT
);
240 OLESTATUS (CALLBACK
*Update
)(LPOLEOBJECT
);
241 OLESTATUS (CALLBACK
*Reconnect
)(LPOLEOBJECT
);
242 OLESTATUS (CALLBACK
*ObjectConvert
)(LPOLEOBJECT
,LPCOLESTR16
,LPOLECLIENT
,LHCLIENTDOC
,LPCOLESTR16
,LPOLEOBJECT
*);
243 OLESTATUS (CALLBACK
*GetLinkUpdateOptions
)(LPOLEOBJECT
,LPOLEOPT_UPDATE
);
244 OLESTATUS (CALLBACK
*SetLinkUpdateOptions
)(LPOLEOBJECT
,OLEOPT_UPDATE
);
245 OLESTATUS (CALLBACK
*Rename
)(LPOLEOBJECT
,LPCOLESTR16
);
246 OLESTATUS (CALLBACK
*QueryName
)(LPOLEOBJECT
,LPSTR
,LPUINT16
);
247 OLESTATUS (CALLBACK
*QueryType
)(LPOLEOBJECT
,LPLONG
);
248 OLESTATUS (CALLBACK
*QueryBounds
)(LPOLEOBJECT
,LPRECT16
);
249 OLESTATUS (CALLBACK
*QuerySize
)(LPOLEOBJECT
,LPDWORD
);
250 OLESTATUS (CALLBACK
*QueryOpen
)(LPOLEOBJECT
);
251 OLESTATUS (CALLBACK
*QueryOutOfDate
)(LPOLEOBJECT
);
252 OLESTATUS (CALLBACK
*QueryReleaseStatus
)(LPOLEOBJECT
);
253 OLESTATUS (CALLBACK
*QueryReleaseError
)(LPOLEOBJECT
);
254 OLE_RELEASE_METHOD (CALLBACK
*QueryReleaseMethod
)(LPOLEOBJECT
);
255 OLESTATUS (CALLBACK
*RequestData
)(LPOLEOBJECT
,OLECLIPFORMAT
);
256 OLESTATUS (CALLBACK
*ObjectLong
)(LPOLEOBJECT
,UINT16
,LPLONG
);
258 typedef OLEOBJECTVTBL
* LPOLEOBJECTVTBL
;
260 typedef struct _OLEOBJECT
{
261 LPOLEOBJECTVTBL lpvtbl
;
265 OLESTATUS WINAPI
OleRegisterServer16(LPCSTR
,LPOLESERVER
,LHSERVER
*,HINSTANCE16
,OLE_SERVER_USE
);
266 OLESTATUS WINAPI
OleUnblockServer16(LHSERVER
,BOOL16
*);
267 OLESTATUS WINAPI
OleRegisterServerDoc16(LHSERVER
,LPCSTR
,LPOLESERVERDOC
,LHSERVERDOC
*);
268 OLESTATUS WINAPI
OleRegisterClientDoc16(LPCSTR
,LPCSTR
,LONG
,LHCLIENTDOC
*);
269 OLESTATUS WINAPI
OleRenameClientDoc16(LHCLIENTDOC
,LPCSTR
);
270 OLESTATUS WINAPI
OleRevokeServerDoc16(LHSERVERDOC
);
271 OLESTATUS WINAPI
OleRevokeClientDoc16(LHCLIENTDOC
);
272 OLESTATUS WINAPI
OleRevokeServer16(LHSERVER
);
273 OLESTATUS WINAPI
OleRevertClientDoc16(LHCLIENTDOC hServerDoc
);
274 OLESTATUS WINAPI
OleEnumObjects16(LHCLIENTDOC hServerDoc
, SEGPTR data
);
275 OLESTATUS WINAPI
OleCreateLinkFromClip16(
276 LPCSTR name
, LPOLECLIENT olecli
, LHCLIENTDOC hclientdoc
, LPCSTR xname
,
277 LPOLEOBJECT
*lpoleob
, UINT16 render
, UINT16 clipformat
);
278 OLESTATUS WINAPI
OleQueryLinkFromClip16(LPCSTR name
, UINT16 render
, UINT16 clipformat
);
279 OLESTATUS WINAPI
OleQueryCreateFromClip16(LPCSTR name
, UINT16 render
, UINT16 clipformat
);
280 OLESTATUS WINAPI
OleQueryType16(LPOLEOBJECT oleob
, SEGPTR xlong
);
281 OLESTATUS WINAPI
OleCreateFromClip16(
282 LPCSTR name
, LPOLECLIENT olecli
, LHCLIENTDOC hclientdoc
, LPCSTR xname
,
283 LPOLEOBJECT
*lpoleob
, UINT16 render
, UINT16 clipformat
);
286 void WINAPI
CoFreeUnusedLibraries(void);
287 HINSTANCE WINAPI
CoLoadLibrary(LPSTR lpszLibName
, BOOL bAutoFree
);
288 void WINAPI
CoFreeUnusedLibraries(void);
289 void WINAPI
CoFreeAllLibraries(void);
295 #endif /* __WINE_OLE_H */