Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

504 lines
25 KiB

  1. /*****************************************************************************\
  2. * *
  3. * ole.h - Object Linking and Embedding functions, types, and definitions *
  4. * *
  5. * Version 1.0 *
  6. * *
  7. * NOTE: windows.h must be #included first *
  8. * *
  9. * Copyright (c) 1990-1994, Microsoft Corp. All rights reserved. *
  10. * *
  11. \*****************************************************************************/
  12. #ifndef _INC_OLE
  13. #define _INC_OLE
  14. #ifndef RC_INVOKED
  15. #pragma pack(1) /* Assume byte packing throughout */
  16. #endif /* !RC_INVOKED */
  17. #ifdef __cplusplus
  18. extern "C" { /* Assume C declarations for C++ */
  19. #endif /* __cplusplus */
  20. #ifndef WINAPI /* If not included with 3.1 headers... */
  21. #define WINAPI FAR PASCAL
  22. #define CALLBACK FAR PASCAL
  23. #define LPCSTR LPSTR
  24. #define UINT WORD
  25. #define LPARAM LONG
  26. #define WPARAM WORD
  27. #define LRESULT LONG
  28. #define HMODULE HANDLE
  29. #define HINSTANCE HANDLE
  30. #define HLOCAL HANDLE
  31. #define HGLOBAL HANDLE
  32. #endif /* _INC_WINDOWS */
  33. #ifdef STRICT
  34. #define OLE_LPCSTR LPCSTR
  35. #define OLE_CONST const
  36. #else /* STRICT */
  37. #define OLE_LPCSTR LPSTR
  38. #define OLE_CONST
  39. #endif /* !STRICT */
  40. /* Object types */
  41. #define OT_LINK 1L
  42. #define OT_EMBEDDED 2L
  43. #define OT_STATIC 3L
  44. /* activate verbs */
  45. #define OLEVERB_PRIMARY 0
  46. /* target device info structure */
  47. typedef struct _OLETARGETDEVICE
  48. {
  49. UINT otdDeviceNameOffset;
  50. UINT otdDriverNameOffset;
  51. UINT otdPortNameOffset;
  52. UINT otdExtDevmodeOffset;
  53. UINT otdExtDevmodeSize;
  54. UINT otdEnvironmentOffset;
  55. UINT otdEnvironmentSize;
  56. BYTE otdData[1];
  57. } OLETARGETDEVICE;
  58. typedef OLETARGETDEVICE FAR* LPOLETARGETDEVICE;
  59. /* flags used in some methods */
  60. #define OF_SET 0x0001
  61. #define OF_GET 0x0002
  62. #define OF_HANDLER 0x0004
  63. /* return codes for OLE functions */
  64. typedef enum
  65. {
  66. OLE_OK, /* 0 Function operated correctly */
  67. OLE_WAIT_FOR_RELEASE, /* 1 Command has been initiated, client */
  68. /* must wait for release. keep dispatching */
  69. /* messages till OLE_RELESE in callback */
  70. OLE_BUSY, /* 2 Tried to execute a method while another */
  71. /* method is in progress. */
  72. OLE_ERROR_PROTECT_ONLY, /* 3 Ole APIs are called in real mode */
  73. OLE_ERROR_MEMORY, /* 4 Could not alloc or lock memory */
  74. OLE_ERROR_STREAM, /* 5 (OLESTREAM) stream error */
  75. OLE_ERROR_STATIC, /* 6 Non static object expected */
  76. OLE_ERROR_BLANK, /* 7 Critical data missing */
  77. OLE_ERROR_DRAW, /* 8 Error while drawing */
  78. OLE_ERROR_METAFILE, /* 9 Invalid metafile */
  79. OLE_ERROR_ABORT, /* 10 Client chose to abort metafile drawing */
  80. OLE_ERROR_CLIPBOARD, /* 11 Failed to get/set clipboard data */
  81. OLE_ERROR_FORMAT, /* 12 Requested format is not available */
  82. OLE_ERROR_OBJECT, /* 13 Not a valid object */
  83. OLE_ERROR_OPTION, /* 14 Invalid option(link update / render) */
  84. OLE_ERROR_PROTOCOL, /* 15 Invalid protocol */
  85. OLE_ERROR_ADDRESS, /* 16 One of the pointers is invalid */
  86. OLE_ERROR_NOT_EQUAL, /* 17 Objects are not equal */
  87. OLE_ERROR_HANDLE, /* 18 Invalid handle encountered */
  88. OLE_ERROR_GENERIC, /* 19 Some general error */
  89. OLE_ERROR_CLASS, /* 20 Invalid class */
  90. OLE_ERROR_SYNTAX, /* 21 Command syntax is invalid */
  91. OLE_ERROR_DATATYPE, /* 22 Data format is not supported */
  92. OLE_ERROR_PALETTE, /* 23 Invalid color palette */
  93. OLE_ERROR_NOT_LINK, /* 24 Not a linked object */
  94. OLE_ERROR_NOT_EMPTY, /* 25 Client doc contains objects. */
  95. OLE_ERROR_SIZE, /* 26 Incorrect buffer size passed to the api */
  96. /* that places some string in caller's */
  97. /* buffer */
  98. OLE_ERROR_DRIVE, /* 27 Drive letter in doc name is invalid */
  99. OLE_ERROR_NETWORK, /* 28 Failed to establish connection to a */
  100. /* network share on which the document */
  101. /* is located */
  102. OLE_ERROR_NAME, /* 29 Invalid name(doc name, object name), */
  103. /* etc.. passed to the APIs */
  104. OLE_ERROR_TEMPLATE, /* 30 Server failed to load template */
  105. OLE_ERROR_NEW, /* 31 Server failed to create new doc */
  106. OLE_ERROR_EDIT, /* 32 Server failed to create embedded */
  107. /* instance */
  108. OLE_ERROR_OPEN, /* 33 Server failed to open document, */
  109. /* possible invalid link */
  110. OLE_ERROR_NOT_OPEN, /* 34 Object is not open for editing */
  111. OLE_ERROR_LAUNCH, /* 35 Failed to launch server */
  112. OLE_ERROR_COMM, /* 36 Failed to communicate with server */
  113. OLE_ERROR_TERMINATE, /* 37 Error in termination */
  114. OLE_ERROR_COMMAND, /* 38 Error in execute */
  115. OLE_ERROR_SHOW, /* 39 Error in show */
  116. OLE_ERROR_DOVERB, /* 40 Error in sending do verb, or invalid */
  117. /* verb */
  118. OLE_ERROR_ADVISE_NATIVE, /* 41 Item could be missing */
  119. OLE_ERROR_ADVISE_PICT, /* 42 Item could be missing or server doesn't */
  120. /* this format. */
  121. OLE_ERROR_ADVISE_RENAME, /* 43 Server doesn't support rename */
  122. OLE_ERROR_POKE_NATIVE, /* 44 Failure of poking native data to server */
  123. OLE_ERROR_REQUEST_NATIVE, /* 45 Server failed to render native data */
  124. OLE_ERROR_REQUEST_PICT, /* 46 Server failed to render presentation */
  125. /* data */
  126. OLE_ERROR_SERVER_BLOCKED, /* 47 Trying to block a blocked server or */
  127. /* trying to revoke a blocked server */
  128. /* or document */
  129. OLE_ERROR_REGISTRATION, /* 48 Server is not registered in regestation */
  130. /* data base */
  131. OLE_ERROR_ALREADY_REGISTERED,/*49 Trying to register same doc multiple */
  132. /* times */
  133. OLE_ERROR_TASK, /* 50 Server or client task is invalid */
  134. OLE_ERROR_OUTOFDATE, /* 51 Object is out of date */
  135. OLE_ERROR_CANT_UPDATE_CLIENT,/* 52 Embed doc's client doesn't accept */
  136. /* updates */
  137. OLE_ERROR_UPDATE, /* 53 erorr while trying to update */
  138. OLE_ERROR_SETDATA_FORMAT, /* 54 Server app doesn't understand the */
  139. /* format given to its SetData method */
  140. OLE_ERROR_STATIC_FROM_OTHER_OS,/* 55 trying to load a static object created */
  141. /* on another Operating System */
  142. /* Following are warnings */
  143. OLE_WARN_DELETE_DATA = 1000 /* Caller must delete the data when he is */
  144. /* done with it. */
  145. } OLESTATUS;
  146. /* Codes for CallBack events */
  147. typedef enum
  148. {
  149. OLE_CHANGED, /* 0 */
  150. OLE_SAVED, /* 1 */
  151. OLE_CLOSED, /* 2 */
  152. OLE_RENAMED, /* 3 */
  153. OLE_QUERY_PAINT, /* 4 Interruptible paint support */
  154. OLE_RELEASE, /* 5 Object is released(asynchronous operation */
  155. /* is completed) */
  156. OLE_QUERY_RETRY /* 6 Query for retry when server sends busy ACK */
  157. } OLE_NOTIFICATION;
  158. typedef enum
  159. {
  160. OLE_NONE, /* 0 no method active */
  161. OLE_DELETE, /* 1 object delete */
  162. OLE_LNKPASTE, /* 2 PasteLink(auto reconnect) */
  163. OLE_EMBPASTE, /* 3 paste(and update) */
  164. OLE_SHOW, /* 4 Show */
  165. OLE_RUN, /* 5 Run */
  166. OLE_ACTIVATE, /* 6 Activate */
  167. OLE_UPDATE, /* 7 Update */
  168. OLE_CLOSE, /* 8 Close */
  169. OLE_RECONNECT, /* 9 Reconnect */
  170. OLE_SETUPDATEOPTIONS, /* 10 setting update options */
  171. OLE_SERVERUNLAUNCH, /* 11 server is being unlaunched */
  172. OLE_LOADFROMSTREAM, /* 12 LoadFromStream(auto reconnect) */
  173. OLE_SETDATA, /* 13 OleSetData */
  174. OLE_REQUESTDATA, /* 14 OleRequestData */
  175. OLE_OTHER, /* 15 other misc async operations */
  176. OLE_CREATE, /* 16 create */
  177. OLE_CREATEFROMTEMPLATE, /* 17 CreatefromTemplate */
  178. OLE_CREATELINKFROMFILE, /* 18 CreateLinkFromFile */
  179. OLE_COPYFROMLNK, /* 19 CopyFromLink(auto reconnect) */
  180. OLE_CREATEFROMFILE, /* 20 CreateFromFile */
  181. OLE_CREATEINVISIBLE /* 21 CreateInvisible */
  182. } OLE_RELEASE_METHOD;
  183. /* rendering options */
  184. typedef enum
  185. {
  186. olerender_none,
  187. olerender_draw,
  188. olerender_format
  189. } OLEOPT_RENDER;
  190. /* standard clipboard format type */
  191. typedef WORD OLECLIPFORMAT;
  192. /* Link update options */
  193. typedef enum
  194. {
  195. oleupdate_always,
  196. oleupdate_onsave,
  197. #ifndef OLE_INTERNAL
  198. oleupdate_oncall
  199. #else
  200. oleupdate_oncall,
  201. oleupdate_onclose
  202. #endif /* OLE_INTERNAL */
  203. } OLEOPT_UPDATE;
  204. typedef HANDLE HOBJECT;
  205. typedef LONG LHSERVER;
  206. typedef LONG LHCLIENTDOC;
  207. typedef LONG LHSERVERDOC;
  208. typedef struct _OLEOBJECT FAR* LPOLEOBJECT;
  209. typedef struct _OLESTREAM FAR* LPOLESTREAM;
  210. typedef struct _OLECLIENT FAR* LPOLECLIENT;
  211. #ifndef OLE_INTERNAL
  212. /* object method table definitions. */
  213. typedef struct _OLEOBJECTVTBL
  214. {
  215. void FAR* (CALLBACK* QueryProtocol) (LPOLEOBJECT, OLE_LPCSTR);
  216. OLESTATUS (CALLBACK* Release) (LPOLEOBJECT);
  217. OLESTATUS (CALLBACK* Show) (LPOLEOBJECT, BOOL);
  218. OLESTATUS (CALLBACK* DoVerb) (LPOLEOBJECT, UINT, BOOL, BOOL);
  219. OLESTATUS (CALLBACK* GetData) (LPOLEOBJECT, OLECLIPFORMAT, HANDLE FAR*);
  220. OLESTATUS (CALLBACK* SetData) (LPOLEOBJECT, OLECLIPFORMAT, HANDLE);
  221. OLESTATUS (CALLBACK* SetTargetDevice) (LPOLEOBJECT, HGLOBAL);
  222. OLESTATUS (CALLBACK* SetBounds) (LPOLEOBJECT, OLE_CONST RECT FAR*);
  223. OLECLIPFORMAT (CALLBACK* EnumFormats) (LPOLEOBJECT, OLECLIPFORMAT);
  224. OLESTATUS (CALLBACK* SetColorScheme) (LPOLEOBJECT, OLE_CONST LOGPALETTE FAR*);
  225. /* Server has to implement only the above methods. */
  226. #ifndef SERVERONLY
  227. /* Extra methods required for client. */
  228. OLESTATUS (CALLBACK* Delete) (LPOLEOBJECT);
  229. OLESTATUS (CALLBACK* SetHostNames) (LPOLEOBJECT, OLE_LPCSTR, OLE_LPCSTR);
  230. OLESTATUS (CALLBACK* SaveToStream) (LPOLEOBJECT, LPOLESTREAM);
  231. OLESTATUS (CALLBACK* Clone) (LPOLEOBJECT, LPOLECLIENT, LHCLIENTDOC, OLE_LPCSTR, LPOLEOBJECT FAR*);
  232. OLESTATUS (CALLBACK* CopyFromLink) (LPOLEOBJECT, LPOLECLIENT, LHCLIENTDOC, OLE_LPCSTR, LPOLEOBJECT FAR*);
  233. OLESTATUS (CALLBACK* Equal) (LPOLEOBJECT, LPOLEOBJECT);
  234. OLESTATUS (CALLBACK* CopyToClipboard) (LPOLEOBJECT);
  235. OLESTATUS (CALLBACK* Draw) (LPOLEOBJECT, HDC, OLE_CONST RECT FAR*, OLE_CONST RECT FAR*, HDC);
  236. OLESTATUS (CALLBACK* Activate) (LPOLEOBJECT, UINT, BOOL, BOOL, HWND, OLE_CONST RECT FAR*);
  237. OLESTATUS (CALLBACK* Execute) (LPOLEOBJECT, HGLOBAL, UINT);
  238. OLESTATUS (CALLBACK* Close) (LPOLEOBJECT);
  239. OLESTATUS (CALLBACK* Update) (LPOLEOBJECT);
  240. OLESTATUS (CALLBACK* Reconnect) (LPOLEOBJECT);
  241. OLESTATUS (CALLBACK* ObjectConvert) (LPOLEOBJECT, OLE_LPCSTR, LPOLECLIENT, LHCLIENTDOC, OLE_LPCSTR, LPOLEOBJECT FAR*);
  242. OLESTATUS (CALLBACK* GetLinkUpdateOptions) (LPOLEOBJECT, OLEOPT_UPDATE FAR*);
  243. OLESTATUS (CALLBACK* SetLinkUpdateOptions) (LPOLEOBJECT, OLEOPT_UPDATE);
  244. OLESTATUS (CALLBACK* Rename) (LPOLEOBJECT, OLE_LPCSTR);
  245. OLESTATUS (CALLBACK* QueryName) (LPOLEOBJECT, LPSTR, UINT FAR*);
  246. OLESTATUS (CALLBACK* QueryType) (LPOLEOBJECT, LONG FAR*);
  247. OLESTATUS (CALLBACK* QueryBounds) (LPOLEOBJECT, RECT FAR*);
  248. OLESTATUS (CALLBACK* QuerySize) (LPOLEOBJECT, DWORD FAR*);
  249. OLESTATUS (CALLBACK* QueryOpen) (LPOLEOBJECT);
  250. OLESTATUS (CALLBACK* QueryOutOfDate) (LPOLEOBJECT);
  251. OLESTATUS (CALLBACK* QueryReleaseStatus) (LPOLEOBJECT);
  252. OLESTATUS (CALLBACK* QueryReleaseError) (LPOLEOBJECT);
  253. OLE_RELEASE_METHOD (CALLBACK* QueryReleaseMethod)(LPOLEOBJECT);
  254. OLESTATUS (CALLBACK* RequestData) (LPOLEOBJECT, OLECLIPFORMAT);
  255. OLESTATUS (CALLBACK* ObjectLong) (LPOLEOBJECT, UINT, LONG FAR*);
  256. /* This method is internal only */
  257. OLESTATUS (CALLBACK* ChangeData) (LPOLEOBJECT, HANDLE, LPOLECLIENT, BOOL);
  258. #endif /* !SERVERONLY */
  259. } OLEOBJECTVTBL;
  260. typedef OLEOBJECTVTBL FAR* LPOLEOBJECTVTBL;
  261. typedef struct _OLEOBJECT
  262. {
  263. LPOLEOBJECTVTBL lpvtbl;
  264. } OLEOBJECT;
  265. #endif /* !OLE_NTERNAL */
  266. /* ole client definitions */
  267. typedef struct _OLECLIENTVTBL
  268. {
  269. int (CALLBACK* CallBack)(LPOLECLIENT, OLE_NOTIFICATION, LPOLEOBJECT);
  270. } OLECLIENTVTBL;
  271. typedef OLECLIENTVTBL FAR* LPOLECLIENTVTBL;
  272. typedef struct _OLECLIENT
  273. {
  274. LPOLECLIENTVTBL lpvtbl;
  275. } OLECLIENT;
  276. /* Stream definitions */
  277. typedef struct _OLESTREAMVTBL
  278. {
  279. DWORD (CALLBACK* Get)(LPOLESTREAM, void FAR*, DWORD);
  280. DWORD (CALLBACK* Put)(LPOLESTREAM, OLE_CONST void FAR*, DWORD);
  281. } OLESTREAMVTBL;
  282. typedef OLESTREAMVTBL FAR* LPOLESTREAMVTBL;
  283. typedef struct _OLESTREAM
  284. {
  285. LPOLESTREAMVTBL lpstbl;
  286. } OLESTREAM;
  287. /* Public Function Prototypes */
  288. OLESTATUS WINAPI OleDelete(LPOLEOBJECT);
  289. OLESTATUS WINAPI OleRelease(LPOLEOBJECT);
  290. OLESTATUS WINAPI OleSaveToStream(LPOLEOBJECT, LPOLESTREAM);
  291. OLESTATUS WINAPI OleEqual(LPOLEOBJECT, LPOLEOBJECT );
  292. OLESTATUS WINAPI OleCopyToClipboard(LPOLEOBJECT);
  293. OLESTATUS WINAPI OleSetHostNames(LPOLEOBJECT, LPCSTR, LPCSTR);
  294. OLESTATUS WINAPI OleSetTargetDevice(LPOLEOBJECT, HGLOBAL);
  295. OLESTATUS WINAPI OleSetBounds(LPOLEOBJECT, const RECT FAR*);
  296. OLESTATUS WINAPI OleSetColorScheme(LPOLEOBJECT, const LOGPALETTE FAR*);
  297. OLESTATUS WINAPI OleQueryBounds(LPOLEOBJECT, RECT FAR*);
  298. OLESTATUS WINAPI OleQuerySize(LPOLEOBJECT, DWORD FAR*);
  299. OLESTATUS WINAPI OleDraw(LPOLEOBJECT, HDC, const RECT FAR*, const RECT FAR*, HDC);
  300. OLESTATUS WINAPI OleQueryOpen(LPOLEOBJECT);
  301. OLESTATUS WINAPI OleActivate(LPOLEOBJECT, UINT, BOOL, BOOL, HWND, const RECT FAR*);
  302. OLESTATUS WINAPI OleExecute(LPOLEOBJECT, HGLOBAL, UINT);
  303. OLESTATUS WINAPI OleClose(LPOLEOBJECT);
  304. OLESTATUS WINAPI OleUpdate(LPOLEOBJECT);
  305. OLESTATUS WINAPI OleReconnect(LPOLEOBJECT);
  306. OLESTATUS WINAPI OleGetLinkUpdateOptions(LPOLEOBJECT, OLEOPT_UPDATE FAR*);
  307. OLESTATUS WINAPI OleSetLinkUpdateOptions(LPOLEOBJECT, OLEOPT_UPDATE);
  308. void FAR* WINAPI OleQueryProtocol(LPOLEOBJECT, LPCSTR);
  309. /* Routines related to asynchronous operations. */
  310. OLESTATUS WINAPI OleQueryReleaseStatus(LPOLEOBJECT);
  311. OLESTATUS WINAPI OleQueryReleaseError(LPOLEOBJECT);
  312. OLE_RELEASE_METHOD WINAPI OleQueryReleaseMethod(LPOLEOBJECT);
  313. OLESTATUS WINAPI OleQueryType(LPOLEOBJECT, LONG FAR*);
  314. /* LOWORD is major version, HIWORD is minor version */
  315. DWORD WINAPI OleQueryClientVersion(void);
  316. DWORD WINAPI OleQueryServerVersion(void);
  317. /* Converting to format (as in clipboard): */
  318. OLECLIPFORMAT WINAPI OleEnumFormats(LPOLEOBJECT, OLECLIPFORMAT);
  319. OLESTATUS WINAPI OleGetData(LPOLEOBJECT, OLECLIPFORMAT, HANDLE FAR*);
  320. OLESTATUS WINAPI OleSetData(LPOLEOBJECT, OLECLIPFORMAT, HANDLE);
  321. OLESTATUS WINAPI OleQueryOutOfDate(LPOLEOBJECT);
  322. OLESTATUS WINAPI OleRequestData(LPOLEOBJECT, OLECLIPFORMAT);
  323. /* Query apis for creation from clipboard */
  324. OLESTATUS WINAPI OleQueryLinkFromClip(LPCSTR, OLEOPT_RENDER, OLECLIPFORMAT);
  325. OLESTATUS WINAPI OleQueryCreateFromClip(LPCSTR, OLEOPT_RENDER, OLECLIPFORMAT);
  326. /* Object creation functions */
  327. OLESTATUS WINAPI OleCreateFromClip(LPCSTR, LPOLECLIENT, LHCLIENTDOC, LPCSTR, LPOLEOBJECT FAR*, OLEOPT_RENDER, OLECLIPFORMAT);
  328. OLESTATUS WINAPI OleCreateLinkFromClip(LPCSTR, LPOLECLIENT, LHCLIENTDOC, LPCSTR, LPOLEOBJECT FAR*, OLEOPT_RENDER, OLECLIPFORMAT);
  329. OLESTATUS WINAPI OleCreateFromFile(LPCSTR, LPOLECLIENT, LPCSTR, LPCSTR, LHCLIENTDOC, LPCSTR, LPOLEOBJECT FAR*, OLEOPT_RENDER, OLECLIPFORMAT);
  330. OLESTATUS WINAPI OleCreateLinkFromFile(LPCSTR, LPOLECLIENT, LPCSTR, LPCSTR, LPCSTR, LHCLIENTDOC, LPCSTR, LPOLEOBJECT FAR*, OLEOPT_RENDER, OLECLIPFORMAT);
  331. OLESTATUS WINAPI OleLoadFromStream(LPOLESTREAM, LPCSTR, LPOLECLIENT, LHCLIENTDOC, LPCSTR, LPOLEOBJECT FAR*);
  332. OLESTATUS WINAPI OleCreate(LPCSTR, LPOLECLIENT, LPCSTR, LHCLIENTDOC, LPCSTR, LPOLEOBJECT FAR*, OLEOPT_RENDER, OLECLIPFORMAT);
  333. OLESTATUS WINAPI OleCreateInvisible(LPCSTR, LPOLECLIENT, LPCSTR, LHCLIENTDOC, LPCSTR, LPOLEOBJECT FAR*, OLEOPT_RENDER, OLECLIPFORMAT, BOOL);
  334. OLESTATUS WINAPI OleCreateFromTemplate(LPCSTR, LPOLECLIENT, LPCSTR, LHCLIENTDOC, LPCSTR, LPOLEOBJECT FAR*, OLEOPT_RENDER, OLECLIPFORMAT);
  335. OLESTATUS WINAPI OleClone(LPOLEOBJECT, LPOLECLIENT, LHCLIENTDOC, LPCSTR, LPOLEOBJECT FAR*);
  336. OLESTATUS WINAPI OleCopyFromLink(LPOLEOBJECT, LPCSTR, LPOLECLIENT, LHCLIENTDOC, LPCSTR, LPOLEOBJECT FAR*);
  337. OLESTATUS WINAPI OleObjectConvert(LPOLEOBJECT, LPCSTR, LPOLECLIENT, LHCLIENTDOC, LPCSTR, LPOLEOBJECT FAR*);
  338. OLESTATUS WINAPI OleRename(LPOLEOBJECT, LPCSTR);
  339. OLESTATUS WINAPI OleQueryName(LPOLEOBJECT, LPSTR, UINT FAR*);
  340. OLESTATUS WINAPI OleRevokeObject(LPOLECLIENT);
  341. BOOL WINAPI OleIsDcMeta(HDC);
  342. /* client document API */
  343. OLESTATUS WINAPI OleRegisterClientDoc(LPCSTR, LPCSTR, LONG, LHCLIENTDOC FAR*);
  344. OLESTATUS WINAPI OleRevokeClientDoc(LHCLIENTDOC);
  345. OLESTATUS WINAPI OleRenameClientDoc(LHCLIENTDOC, LPCSTR);
  346. OLESTATUS WINAPI OleRevertClientDoc(LHCLIENTDOC);
  347. OLESTATUS WINAPI OleSavedClientDoc(LHCLIENTDOC);
  348. OLESTATUS WINAPI OleEnumObjects(LHCLIENTDOC, LPOLEOBJECT FAR*);
  349. /* server usage definitions */
  350. typedef enum {
  351. OLE_SERVER_MULTI, /* multiple instances */
  352. OLE_SERVER_SINGLE /* single instance(multiple document) */
  353. } OLE_SERVER_USE;
  354. /* Server API */
  355. typedef struct _OLESERVER FAR* LPOLESERVER;
  356. OLESTATUS WINAPI OleRegisterServer(LPCSTR, LPOLESERVER, LHSERVER FAR*, HINSTANCE, OLE_SERVER_USE);
  357. OLESTATUS WINAPI OleRevokeServer(LHSERVER);
  358. OLESTATUS WINAPI OleBlockServer(LHSERVER);
  359. OLESTATUS WINAPI OleUnblockServer(LHSERVER, BOOL FAR*);
  360. /* APIs to keep server open */
  361. OLESTATUS WINAPI OleLockServer(LPOLEOBJECT, LHSERVER FAR*);
  362. OLESTATUS WINAPI OleUnlockServer(LHSERVER);
  363. /* Server document API */
  364. typedef struct _OLESERVERDOC FAR* LPOLESERVERDOC;
  365. OLESTATUS WINAPI OleRegisterServerDoc(LHSERVER, LPCSTR, LPOLESERVERDOC, LHSERVERDOC FAR*);
  366. OLESTATUS WINAPI OleRevokeServerDoc(LHSERVERDOC);
  367. OLESTATUS WINAPI OleRenameServerDoc(LHSERVERDOC, LPCSTR);
  368. OLESTATUS WINAPI OleRevertServerDoc(LHSERVERDOC);
  369. OLESTATUS WINAPI OleSavedServerDoc(LHSERVERDOC);
  370. typedef struct _OLESERVERVTBL
  371. {
  372. OLESTATUS (CALLBACK* Open) (LPOLESERVER, LHSERVERDOC, OLE_LPCSTR, LPOLESERVERDOC FAR*);
  373. /* long handle to doc(privtate to DLL) */
  374. /* lp to OLESERVER */
  375. /* document name */
  376. /* place holder for returning oledoc. */
  377. OLESTATUS (CALLBACK* Create)(LPOLESERVER, LHSERVERDOC, OLE_LPCSTR, OLE_LPCSTR, LPOLESERVERDOC FAR*);
  378. /* long handle to doc(privtate to DLL) */
  379. /* lp to OLESERVER */
  380. /* lp class name */
  381. /* lp doc name */
  382. /* place holder for returning oledoc. */
  383. OLESTATUS (CALLBACK* CreateFromTemplate)(LPOLESERVER, LHSERVERDOC, OLE_LPCSTR, OLE_LPCSTR, OLE_LPCSTR, LPOLESERVERDOC FAR*);
  384. /* long handle to doc(privtate to DLL) */
  385. /* lp to OLESERVER */
  386. /* lp class name */
  387. /* lp doc name */
  388. /* lp template name */
  389. /* place holder for returning oledoc. */
  390. OLESTATUS (CALLBACK* Edit) (LPOLESERVER, LHSERVERDOC, OLE_LPCSTR, OLE_LPCSTR, LPOLESERVERDOC FAR*);
  391. /* long handle to doc(privtate to DLL) */
  392. /* lp to OLESERVER */
  393. /* lp class name */
  394. /* lp doc name */
  395. /* place holder for returning oledoc. */
  396. OLESTATUS (CALLBACK* Exit) (LPOLESERVER);
  397. /* lp OLESERVER */
  398. OLESTATUS (CALLBACK* Release) (LPOLESERVER);
  399. /* lp OLESERVER */
  400. OLESTATUS (CALLBACK* Execute)(LPOLESERVER, HGLOBAL);
  401. /* lp OLESERVER */
  402. /* handle to command strings */
  403. } OLESERVERVTBL;
  404. typedef OLESERVERVTBL FAR* LPOLESERVERVTBL;
  405. typedef struct _OLESERVER
  406. {
  407. LPOLESERVERVTBL lpvtbl;
  408. } OLESERVER;
  409. typedef struct _OLESERVERDOCVTBL
  410. {
  411. OLESTATUS (CALLBACK* Save) (LPOLESERVERDOC);
  412. OLESTATUS (CALLBACK* Close) (LPOLESERVERDOC);
  413. OLESTATUS (CALLBACK* SetHostNames)(LPOLESERVERDOC, OLE_LPCSTR, OLE_LPCSTR);
  414. OLESTATUS (CALLBACK* SetDocDimensions)(LPOLESERVERDOC, OLE_CONST RECT FAR*);
  415. OLESTATUS (CALLBACK* GetObject) (LPOLESERVERDOC, OLE_LPCSTR, LPOLEOBJECT FAR*, LPOLECLIENT);
  416. OLESTATUS (CALLBACK* Release) (LPOLESERVERDOC);
  417. OLESTATUS (CALLBACK* SetColorScheme)(LPOLESERVERDOC, OLE_CONST LOGPALETTE FAR*);
  418. OLESTATUS (CALLBACK* Execute) (LPOLESERVERDOC, HGLOBAL);
  419. } OLESERVERDOCVTBL;
  420. typedef OLESERVERDOCVTBL FAR* LPOLESERVERDOCVTBL;
  421. typedef struct _OLESERVERDOC
  422. {
  423. LPOLESERVERDOCVTBL lpvtbl;
  424. } OLESERVERDOC;
  425. #ifdef __cplusplus
  426. }
  427. #endif /* __cplusplus */
  428. #ifndef RC_INVOKED
  429. #pragma pack()
  430. #endif /* !RC_INVOKED */
  431. #endif /* !_INC_OLE */