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
22 #define OLESTR(x) L##x /* probably wrong */
30 #define OLEVERB_PRIMARY 0
37 OLE_ERROR_PROTECT_ONLY
,
75 OLE_ERROR_ADVISE_NATIVE
,
76 OLE_ERROR_ADVISE_PICT
,
77 OLE_ERROR_ADVISE_RENAME
,
78 OLE_ERROR_POKE_NATIVE
,
79 OLE_ERROR_REQUEST_NATIVE
,
80 OLE_ERROR_REQUEST_PICT
,
81 OLE_ERROR_SERVER_BLOCKED
,
82 OLE_ERROR_REGISTRATION
,
83 OLE_ERROR_ALREADY_REGISTERED
,
86 OLE_ERROR_CANT_UPDATE_CLIENT
,
88 OLE_ERROR_SETDATA_FORMAT
,
89 OLE_ERROR_STATIC_FROM_OTHER_OS
,
90 OLE_WARN_DELETE_DATA
= 1000
121 typedef LONG LHSERVER
;
122 typedef LONG LHSERVERDOC
;
123 typedef LONG LHCLIENTDOC
;
124 typedef LONG OLECLIPFORMAT
;/* dunno about this type, please change/add */
125 typedef OLEOPT_UPDATE
* LPOLEOPT_UPDATE
;
129 OLE_DELETE
, /* delete object */
130 OLE_LNKPASTE
, /* link paste */
131 OLE_EMBPASTE
, /* paste(and update) */
138 OLE_SETUPDATEOPTIONS
,
139 OLE_SERVERRUNLAUNCH
, /* unlaunch (terminate?) server */
140 OLE_LOADFROMSTREAM
, /* (auto reconnect) */
141 OLE_SETDATA
, /* OleSetData */
142 OLE_REQUESTDATA
, /* OleRequestData */
145 OLE_CREATEFROMTEMPLATE
,
146 OLE_CREATELINKFROMFILE
,
150 } OLE_RELEASE_METHOD
;
152 typedef struct _OLETARGETDEVICE
{
153 UINT16 otdDeviceNameOffset
;
154 UINT16 otdDriverNameOffset
;
155 UINT16 otdPortNameOffset
;
156 UINT16 otdExtDevmodeOffset
;
157 UINT16 otdExtDevmodeSize
;
158 UINT16 otdEnvironmentOffset
;
159 UINT16 otdEnvironmentSize
;
163 typedef struct _OLESTREAM
* LPOLESTREAM
;
164 typedef struct _OLESTREAMVTBL
{
165 DWORD (CALLBACK
*Get
)(LPOLESTREAM
,LPSTR
,DWORD
);
166 DWORD (CALLBACK
*Put
)(LPOLESTREAM
,LPSTR
,DWORD
);
168 typedef OLESTREAMVTBL
* LPOLESTREAMVTBL
;
169 typedef struct _OLESTREAM
{
170 LPOLESTREAMVTBL lpstbl
;
172 typedef struct _OLESERVERDOC
* LPOLESERVERDOC
;
173 typedef struct _OLEOBJECT
* LPOLEOBJECT
;
174 typedef struct _OLECLIENT
* LPOLECLIENT
;
175 typedef struct _OLESERVERDOCVTBL
{
176 OLESTATUS (CALLBACK
*Save
)(LPOLESERVERDOC
);
177 OLESTATUS (CALLBACK
*Close
)(LPOLESERVERDOC
);
178 OLESTATUS (CALLBACK
*SetHostNames
)(LPOLESERVERDOC
,LPCOLESTR16
,LPCOLESTR16
);
179 OLESTATUS (CALLBACK
*SetDocDimensions
)(LPOLESERVERDOC
,LPRECT16
);
181 /* GetObject is a WINELIB_NAME macro so it cannot be used in Wine itself */
182 OLESTATUS (CALLBACK
*pGetObject
)(LPOLESERVERDOC
,LPCOLESTR16
,LPOLEOBJECT
*,LPOLECLIENT
);
184 OLESTATUS (CALLBACK
*GetObject
)(LPOLESERVERDOC
,LPCOLESTR16
,LPOLEOBJECT
*,LPOLECLIENT
);
186 OLESTATUS (CALLBACK
*Release
)(LPOLESERVERDOC
);
187 OLESTATUS (CALLBACK
*SetColorScheme
)(LPOLESERVERDOC
,LPLOGPALETTE
);
188 OLESTATUS (CALLBACK
*Execute
)(LPOLESERVERDOC
,HGLOBAL16
);
190 typedef OLESERVERDOCVTBL
* LPOLESERVERDOCVTBL
;
191 typedef struct _OLESERVERDOC
{
192 LPOLESERVERDOCVTBL lpvtbl
;
193 /* server provided state info */
196 typedef struct _OLESERVER
* LPOLESERVER
;
197 typedef struct _OLESERVERVTBL
{
198 OLESTATUS (CALLBACK
*Open
)(LPOLESERVER
,LHSERVERDOC
,LPCOLESTR16
,LPOLESERVERDOC
*);
199 OLESTATUS (CALLBACK
*Create
)(LPOLESERVER
,LHSERVERDOC
,LPCOLESTR16
,LPCOLESTR16
,LPOLESERVERDOC
*);
200 OLESTATUS (CALLBACK
*CreateFromTemplate
)(LPOLESERVER
,LHSERVERDOC
,LPCOLESTR16
,LPCOLESTR16
,LPCOLESTR16
,LPOLESERVERDOC
*);
201 OLESTATUS (CALLBACK
*Edit
)(LPOLESERVER
,LHSERVERDOC
,LPCOLESTR16
,LPCOLESTR16
,LPOLESERVERDOC
*);
202 OLESTATUS (CALLBACK
*Exit
)(LPOLESERVER
);
203 OLESTATUS (CALLBACK
*Release
)(LPOLESERVER
);
204 OLESTATUS (CALLBACK
*Execute
)(LPOLESERVER
);
206 typedef OLESERVERVTBL
*LPOLESERVERVTBL
;
207 typedef struct _OLESERVER
{
208 LPOLESERVERVTBL lpvtbl
;
209 /* server specific data */
211 typedef struct _OLECLIENTVTBL
{
212 int (CALLBACK
*CallBack
)(LPOLECLIENT
,OLE_NOTIFICATION
,LPOLEOBJECT
);
214 typedef OLECLIENTVTBL
*LPOLECLIENTVTBL
;
216 typedef struct _OLECLIENT
{
217 LPOLECLIENTVTBL lpvtbl
;
221 typedef struct _OLEOBJECTVTBL
{
222 void * (CALLBACK
*QueryProtocol
)(LPOLEOBJECT
,LPCOLESTR16
);
223 OLESTATUS (CALLBACK
*Release
)(LPOLEOBJECT
);
224 OLESTATUS (CALLBACK
*Show
)(LPOLEOBJECT
,BOOL16
);
225 OLESTATUS (CALLBACK
*DoVerb
)(LPOLEOBJECT
,UINT16
,BOOL16
,BOOL16
);
226 OLESTATUS (CALLBACK
*GetData
)(LPOLEOBJECT
,OLECLIPFORMAT
,HANDLE16
*);
227 OLESTATUS (CALLBACK
*SetData
)(LPOLEOBJECT
,OLECLIPFORMAT
,HANDLE16
);
228 OLESTATUS (CALLBACK
*SetTargetDevice
)(LPOLEOBJECT
,HGLOBAL16
);
229 OLESTATUS (CALLBACK
*SetBounds
)(LPOLEOBJECT
,LPRECT16
);
230 OLESTATUS (CALLBACK
*EnumFormats
)(LPOLEOBJECT
,OLECLIPFORMAT
);
231 OLESTATUS (CALLBACK
*SetColorScheme
)(LPOLEOBJECT
,LPLOGPALETTE
);
232 OLESTATUS (CALLBACK
*Delete
)(LPOLEOBJECT
);
233 OLESTATUS (CALLBACK
*SetHostNames
)(LPOLEOBJECT
,LPCOLESTR16
,LPCOLESTR16
);
234 OLESTATUS (CALLBACK
*SaveToStream
)(LPOLEOBJECT
,LPOLESTREAM
);
235 OLESTATUS (CALLBACK
*Clone
)(LPOLEOBJECT
,LPOLECLIENT
,LHCLIENTDOC
,LPCOLESTR16
,LPOLEOBJECT
*);
236 OLESTATUS (CALLBACK
*CopyFromLink
)(LPOLEOBJECT
,LPOLECLIENT
,LHCLIENTDOC
,LPCOLESTR16
,LPOLEOBJECT
*);
237 OLESTATUS (CALLBACK
*Equal
)(LPOLEOBJECT
,LPOLEOBJECT
);
238 OLESTATUS (CALLBACK
*CopyToClipBoard
)(LPOLEOBJECT
);
239 OLESTATUS (CALLBACK
*Draw
)(LPOLEOBJECT
,HDC16
,LPRECT16
,LPRECT16
,HDC16
);
240 OLESTATUS (CALLBACK
*Activate
)(LPOLEOBJECT
,UINT16
,BOOL16
,BOOL16
,HWND16
,LPRECT16
);
241 OLESTATUS (CALLBACK
*Execute
)(LPOLEOBJECT
,HGLOBAL16
,UINT16
);
242 OLESTATUS (CALLBACK
*Close
)(LPOLEOBJECT
);
243 OLESTATUS (CALLBACK
*Update
)(LPOLEOBJECT
);
244 OLESTATUS (CALLBACK
*Reconnect
)(LPOLEOBJECT
);
245 OLESTATUS (CALLBACK
*ObjectConvert
)(LPOLEOBJECT
,LPCOLESTR16
,LPOLECLIENT
,LHCLIENTDOC
,LPCOLESTR16
,LPOLEOBJECT
*);
246 OLESTATUS (CALLBACK
*GetLinkUpdateOptions
)(LPOLEOBJECT
,LPOLEOPT_UPDATE
);
247 OLESTATUS (CALLBACK
*SetLinkUpdateOptions
)(LPOLEOBJECT
,OLEOPT_UPDATE
);
248 OLESTATUS (CALLBACK
*Rename
)(LPOLEOBJECT
,LPCOLESTR16
);
249 OLESTATUS (CALLBACK
*QueryName
)(LPOLEOBJECT
,LPSTR
,LPUINT16
);
250 OLESTATUS (CALLBACK
*QueryType
)(LPOLEOBJECT
,LPLONG
);
251 OLESTATUS (CALLBACK
*QueryBounds
)(LPOLEOBJECT
,LPRECT16
);
252 OLESTATUS (CALLBACK
*QuerySize
)(LPOLEOBJECT
,LPDWORD
);
253 OLESTATUS (CALLBACK
*QueryOpen
)(LPOLEOBJECT
);
254 OLESTATUS (CALLBACK
*QueryOutOfDate
)(LPOLEOBJECT
);
255 OLESTATUS (CALLBACK
*QueryReleaseStatus
)(LPOLEOBJECT
);
256 OLESTATUS (CALLBACK
*QueryReleaseError
)(LPOLEOBJECT
);
257 OLE_RELEASE_METHOD (CALLBACK
*QueryReleaseMethod
)(LPOLEOBJECT
);
258 OLESTATUS (CALLBACK
*RequestData
)(LPOLEOBJECT
,OLECLIPFORMAT
);
259 OLESTATUS (CALLBACK
*ObjectLong
)(LPOLEOBJECT
,UINT16
,LPLONG
);
261 typedef OLEOBJECTVTBL
* LPOLEOBJECTVTBL
;
263 typedef struct _OLEOBJECT
{
264 LPOLEOBJECTVTBL lpvtbl
;
268 OLESTATUS WINAPI
OleRegisterServer16(LPCSTR
,LPOLESERVER
,LHSERVER
*,HINSTANCE16
,OLE_SERVER_USE
);
269 OLESTATUS WINAPI
OleUnblockServer16(LHSERVER
,BOOL16
*);
270 OLESTATUS WINAPI
OleRegisterServerDoc16(LHSERVER
,LPCSTR
,LPOLESERVERDOC
,LHSERVERDOC
*);
271 OLESTATUS WINAPI
OleRegisterClientDoc16(LPCSTR
,LPCSTR
,LONG
,LHCLIENTDOC
*);
272 OLESTATUS WINAPI
OleRenameClientDoc16(LHCLIENTDOC
,LPCSTR
);
273 OLESTATUS WINAPI
OleRevokeServerDoc16(LHSERVERDOC
);
274 OLESTATUS WINAPI
OleRevokeClientDoc16(LHCLIENTDOC
);
275 OLESTATUS WINAPI
OleRevokeServer16(LHSERVER
);
276 OLESTATUS WINAPI
OleRevertClientDoc16(LHCLIENTDOC hServerDoc
);
277 OLESTATUS WINAPI
OleEnumObjects16(LHCLIENTDOC hServerDoc
, SEGPTR data
);
278 OLESTATUS WINAPI
OleCreateLinkFromClip16(
279 LPCSTR name
, LPOLECLIENT olecli
, LHCLIENTDOC hclientdoc
, LPCSTR xname
,
280 LPOLEOBJECT
*lpoleob
, UINT16 render
, UINT16 clipformat
);
281 OLESTATUS WINAPI
OleQueryLinkFromClip16(LPCSTR name
, UINT16 render
, UINT16 clipformat
);
282 OLESTATUS WINAPI
OleQueryCreateFromClip16(LPCSTR name
, UINT16 render
, UINT16 clipformat
);
283 OLESTATUS WINAPI
OleQueryType16(LPOLEOBJECT oleob
, SEGPTR xlong
);
284 OLESTATUS WINAPI
OleCreateFromClip16(
285 LPCSTR name
, LPOLECLIENT olecli
, LHCLIENTDOC hclientdoc
, LPCSTR xname
,
286 LPOLEOBJECT
*lpoleob
, UINT16 render
, UINT16 clipformat
);
289 void WINAPI
CoFreeUnusedLibraries(void);
290 HINSTANCE WINAPI
CoLoadLibrary(LPSTR lpszLibName
, BOOL bAutoFree
);
291 void WINAPI
CoFreeUnusedLibraries(void);
292 void WINAPI
CoFreeAllLibraries(void);
298 #endif /* __WINE_OLE_H */