Source code of Windows XP (NT5)
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.

958 lines
39 KiB

  1. /****************************** Module Header ******************************\
  2. * Module Name: dll.h
  3. *
  4. * PURPOSE: Private definitions file for ole.c
  5. *
  6. * Created: 1990
  7. *
  8. * Copyright (c) 1990, 1991 Microsoft Corporation
  9. *
  10. * History:
  11. * Raor, Srinik (../../90,91) Original
  12. *
  13. \***************************************************************************/
  14. #define OLE_INTERNAL
  15. #include "cmacs.h"
  16. #include "ole.h"
  17. /////////////////////////////////////////////////////////////////////////////
  18. // //
  19. // Defines, Object methods table and Structures. //
  20. // //
  21. /////////////////////////////////////////////////////////////////////////////
  22. #ifndef HUGE
  23. #define HUGE huge
  24. #endif
  25. // Different OS version numbers. One of these values will be in the HIWORD
  26. // of the OLE version field
  27. #define OS_WIN16 0x0000
  28. #define OS_MAC 0x0001
  29. #define OS_WIN32 0x0002
  30. // Characteristics Type Field
  31. #define CT_NULL 0L
  32. #define CT_LINK 1L
  33. #define CT_EMBEDDED 2L
  34. #define CT_STATIC 3L
  35. #define CT_OLDLINK 4L
  36. #define CT_PICTURE 5L
  37. #define OLE_NO 0 // for boolean query functions
  38. #define OLE_YES 1 // for boolean query functions
  39. #define MAX_STR 256
  40. #define MAX_NET_NAME MAX_STR
  41. #define INVALID_INDEX -1
  42. #define MAX_ATOM 256
  43. #define NUM_RENDER 3
  44. #define PROTOCOL_EDIT ((LPSTR)"StdFileEditing")
  45. #define PROTOCOL_STATIC ((LPSTR)"Static")
  46. #define PROTOCOL_EXECUTE ((LPSTR)"StdExecute")
  47. #define READ_ACCESS 0
  48. #define WRITE_ACCESS 1
  49. #define POPUP_NETDLG 1
  50. extern WORD CheckPointer (LPVOID, int);
  51. WORD FARINTERNAL FarCheckPointer (LPVOID, int);
  52. #define PROBE_OLDLINK(lpobj){\
  53. if (lpobj->bOldLink)\
  54. return OLE_ERROR_OBJECT;\
  55. }
  56. #define PROBE_READ(lp){\
  57. if (!CheckPointer(lp, READ_ACCESS))\
  58. return OLE_ERROR_ADDRESS; \
  59. }
  60. #define PROBE_WRITE(lp){\
  61. if (!CheckPointer(lp, WRITE_ACCESS))\
  62. return OLE_ERROR_ADDRESS; \
  63. }
  64. #define FARPROBE_READ(lp){\
  65. if (!FarCheckPointer(lp, READ_ACCESS))\
  66. return OLE_ERROR_ADDRESS; \
  67. }
  68. #define FARPROBE_WRITE(lp){\
  69. if (!FarCheckPointer(lp, WRITE_ACCESS))\
  70. return OLE_ERROR_ADDRESS; \
  71. }
  72. #define PROBE_MODE(bProtMode) {\
  73. if (!bProtMode) \
  74. return OLE_ERROR_PROTECT_ONLY; \
  75. }
  76. extern OLECLIPFORMAT cfBinary;
  77. extern OLECLIPFORMAT cfOwnerLink;
  78. extern OLECLIPFORMAT cfObjectLink;
  79. extern OLECLIPFORMAT cfLink;
  80. extern OLECLIPFORMAT cfNative;
  81. extern ATOM aStdHostNames;
  82. extern ATOM aStdTargetDevice ;
  83. extern ATOM aStdDocDimensions;
  84. extern ATOM aStdDocName;
  85. extern ATOM aStdColorScheme;
  86. extern ATOM aNullArg;
  87. extern ATOM aSave;
  88. extern ATOM aChange;
  89. extern ATOM aClose;
  90. extern ATOM aPackage;
  91. extern HANDLE hInstDLL;
  92. extern DWORD dwVerToFile;
  93. extern DWORD dwVerFromFile;
  94. extern WORD wWinVer;
  95. extern BOOL bProtMode;
  96. // Used by QuerySize() API;
  97. extern DWORD dwObjSize;
  98. extern OLESTREAM dllStream;
  99. extern BOOL bWLO;
  100. ////////////////////////////////////////////////////////////////////////////
  101. //
  102. // Note: Whenever this table is changed, then we need to update the
  103. // method table in ole.h. Otherwise we are in trouble.
  104. //
  105. ////////////////////////////////////////////////////////////////////////////
  106. typedef struct _OLEOBJECTVTBL{
  107. LPVOID (FAR PASCAL *QueryProtocol) (LPVOID, LPSTR);
  108. OLESTATUS (FAR PASCAL *Release) (LPVOID);
  109. OLESTATUS (FAR PASCAL *Show) (LPVOID, BOOL);
  110. OLESTATUS (FAR PASCAL *DoVerb) (LPVOID, WORD, BOOL, BOOL);
  111. OLESTATUS (FAR PASCAL *GetData) (LPVOID, OLECLIPFORMAT, LPHANDLE);
  112. OLESTATUS (FAR PASCAL *SetData) (LPVOID, OLECLIPFORMAT, HANDLE);
  113. OLESTATUS (FAR PASCAL *SetTargetDevice) (LPVOID, HANDLE);
  114. OLESTATUS (FAR PASCAL *SetBounds) (LPVOID, LPRECT);
  115. OLECLIPFORMAT (FAR PASCAL *EnumFormats) (LPVOID, OLECLIPFORMAT);
  116. OLESTATUS (FAR PASCAL *SetColorScheme) (LPVOID, LPLOGPALETTE);
  117. OLESTATUS (FAR PASCAL *Delete) (LPVOID);
  118. OLESTATUS (FAR PASCAL *SetHostNames) (LPVOID, LPSTR, LPSTR);
  119. OLESTATUS (FAR PASCAL *SaveToStream) (LPVOID, LPOLESTREAM);
  120. OLESTATUS (FAR PASCAL *Clone) (LPVOID, LPOLECLIENT, LHCLIENTDOC, LPSTR, LPVOID);
  121. OLESTATUS (FAR PASCAL *CopyFromLink) (LPVOID, LPOLECLIENT, LHCLIENTDOC, LPSTR, LPVOID);
  122. OLESTATUS (FAR PASCAL *Equal) (LPVOID, LPVOID);
  123. OLESTATUS (FAR PASCAL *CopyToClipboard) (LPVOID);
  124. OLESTATUS (FAR PASCAL *Draw) (LPVOID, HDC, LPRECT, LPRECT, HDC);
  125. OLESTATUS (FAR PASCAL *Activate) (LPVOID, WORD, BOOL, BOOL, HWND, LPRECT);
  126. OLESTATUS (FAR PASCAL *Execute) (LPVOID, HANDLE, WORD);
  127. OLESTATUS (FAR PASCAL *Close) (LPVOID);
  128. OLESTATUS (FAR PASCAL *Update) (LPVOID);
  129. OLESTATUS (FAR PASCAL *Reconnect) (LPVOID);
  130. OLESTATUS (FAR PASCAL *ObjectConvert) (LPVOID, LPSTR, LPOLECLIENT, LHCLIENTDOC, LPSTR, LPOLEOBJECT FAR *);
  131. OLESTATUS (FAR PASCAL *GetLinkUpdateOptions) (LPVOID, OLEOPT_UPDATE FAR *);
  132. OLESTATUS (FAR PASCAL *SetLinkUpdateOptions) (LPVOID, OLEOPT_UPDATE);
  133. OLESTATUS (FAR PASCAL *Rename) (LPVOID, LPSTR);
  134. OLESTATUS (FAR PASCAL *QueryName) (LPVOID, LPSTR, WORD FAR *);
  135. OLESTATUS (FAR PASCAL *QueryType) (LPVOID, LPLONG);
  136. OLESTATUS (FAR PASCAL *QueryBounds) (LPVOID, LPRECT);
  137. OLESTATUS (FAR PASCAL *QuerySize) (LPVOID, DWORD FAR *);
  138. OLESTATUS (FAR PASCAL *QueryOpen) (LPVOID);
  139. OLESTATUS (FAR PASCAL *QueryOutOfDate) (LPVOID);
  140. OLESTATUS (FAR PASCAL *QueryReleaseStatus) (LPVOID);
  141. OLESTATUS (FAR PASCAL *QueryReleaseError) (LPVOID);
  142. OLE_RELEASE_METHOD (FAR PASCAL *QueryReleaseMethod) (LPVOID);
  143. OLESTATUS (FAR PASCAL *RequestData) (LPVOID, OLECLIPFORMAT);
  144. OLESTATUS (FAR PASCAL *ObjectLong) (LPVOID, WORD, LPLONG);
  145. OLESTATUS (FAR PASCAL *ChangeData) (LPVOID, HANDLE, LPOLECLIENT, BOOL);
  146. } OLEOBJECTVTBL;
  147. typedef OLEOBJECTVTBL FAR *LPOLEOBJECTVTBL;
  148. typedef struct _OLEOBJECT { /*object */
  149. LPOLEOBJECTVTBL lpvtbl;
  150. char objId[2];
  151. HOBJECT hobj;
  152. LPOLECLIENT lpclient;
  153. LONG ctype;
  154. LONG cx;
  155. LONG cy;
  156. LONG mm;
  157. int iTable; // Index into the dll table
  158. ATOM aObjName; //** Client
  159. LHCLIENTDOC lhclientdoc; // Document
  160. LPOLEOBJECT lpPrevObj; // related
  161. LPOLEOBJECT lpNextObj; //** fileds
  162. LPOLEOBJECT lpParent; // NULL for LE or Static objects.
  163. } OBJECT;
  164. typedef struct _CF_NAME_ATOM {
  165. char * cfName;
  166. ATOM cfAtom;
  167. } CF_NAME_ATOM;
  168. extern CF_NAME_ATOM cfNameAtom[];
  169. typedef struct _METADC {
  170. int xMwo;
  171. int yMwo;
  172. int xMwe;
  173. int yMwe;
  174. int xre;
  175. int yre;
  176. struct _METADC * pNext;
  177. } METADC, *PMETADC;
  178. typedef struct _METAINFO {
  179. METADC headDc;
  180. int xwo;
  181. int ywo;
  182. int xwe;
  183. int ywe;
  184. int xro;
  185. int yro;
  186. } METAINFO, *PMETAINFO;
  187. typedef struct OBJECT_MF { /* object_mf */
  188. OBJECT head;
  189. DWORD sizeBytes;
  190. METAFILEPICT mfp;
  191. HANDLE hmfp;
  192. BOOL fMetaDC;
  193. OLESTATUS error;
  194. int nRecord;
  195. PMETAINFO pMetaInfo;
  196. PMETADC pCurMdc;
  197. } OBJECT_MF;
  198. typedef OBJECT_MF FAR * LPOBJECT_MF;
  199. typedef struct
  200. {
  201. OBJECT head;
  202. DWORD sizeBytes;
  203. int xSize; // width in pixels
  204. int ySize; // height in pixels
  205. HBITMAP hBitmap;
  206. } OBJECT_BM;
  207. typedef OBJECT_BM FAR * LPOBJECT_BM;
  208. typedef struct _OBJECT_DIB {
  209. OBJECT head;
  210. DWORD sizeBytes;
  211. int xSize;
  212. int ySize;
  213. HANDLE hDIB;
  214. } OBJECT_DIB;
  215. typedef OBJECT_DIB FAR * LPOBJECT_DIB;
  216. typedef struct
  217. {
  218. OBJECT head;
  219. OLECLIPFORMAT cfFormat;
  220. ATOM aClass;
  221. DWORD sizeBytes;
  222. HANDLE hData;
  223. } OBJECT_GEN;
  224. typedef OBJECT_GEN FAR * LPOBJECT_GEN;
  225. typedef struct _RENDER_ENTRY { /* dll_entry */
  226. LPSTR lpClass;
  227. ATOM aClass;
  228. OLESTATUS (FARINTERNAL *Load) (LPOLESTREAM, LPOLECLIENT, LHCLIENTDOC, LPSTR, LPOLEOBJECT FAR *, LONG);
  229. } RENDER_ENTRY;
  230. typedef struct _DLL_ENTRY {
  231. ATOM aDll; /* global atom for dll name with full path */
  232. HANDLE hDll; /* handle to the dll module */
  233. int cObj; /* count of objects, unload dll when this is 0 */
  234. OLESTATUS (FAR PASCAL *Load) (LPOLESTREAM, LPSTR, LPOLECLIENT, LHCLIENTDOC, LPSTR, LPOLEOBJECT FAR *, LONG, ATOM, OLECLIPFORMAT);
  235. OLESTATUS (FAR PASCAL *Clip) (LPSTR, LPOLECLIENT, LHCLIENTDOC, LPSTR, LPOLEOBJECT FAR *, OLEOPT_RENDER, OLECLIPFORMAT, LONG);
  236. OLESTATUS (FAR PASCAL *Link) (LPSTR, LPOLECLIENT, LHCLIENTDOC, LPSTR, LPOLEOBJECT FAR *, OLEOPT_RENDER, OLECLIPFORMAT);
  237. OLESTATUS (FAR PASCAL *CreateFromTemplate) (LPSTR, LPOLECLIENT, LPSTR, LHCLIENTDOC, LPSTR, LPOLEOBJECT FAR *, OLEOPT_RENDER, OLECLIPFORMAT);
  238. OLESTATUS (FAR PASCAL *Create) (LPSTR, LPOLECLIENT, LPSTR, LHCLIENTDOC, LPSTR, LPOLEOBJECT FAR *, OLEOPT_RENDER, OLECLIPFORMAT);
  239. OLESTATUS (FAR PASCAL *CreateFromFile) (LPSTR, LPOLECLIENT, LPSTR, LPSTR, LHCLIENTDOC, LPSTR, LPOLEOBJECT FAR *, OLEOPT_RENDER, OLECLIPFORMAT);
  240. OLESTATUS (FAR PASCAL *CreateLinkFromFile) (LPSTR, LPOLECLIENT, LPSTR, LPSTR, LPSTR, LHCLIENTDOC, LPSTR, LPOLEOBJECT FAR *, OLEOPT_RENDER, OLECLIPFORMAT);
  241. OLESTATUS (FAR PASCAL *CreateInvisible) (LPSTR, LPOLECLIENT, LPSTR, LHCLIENTDOC, LPSTR, LPOLEOBJECT FAR *, OLEOPT_RENDER, OLECLIPFORMAT, BOOL);
  242. } DLL_ENTRY;
  243. /////////////////////////////////////////////////////////////////////////////
  244. // //
  245. // Routines in OLE.C //
  246. // //
  247. /////////////////////////////////////////////////////////////////////////////
  248. BOOL INTERNAL CheckObject(LPOLEOBJECT);
  249. BOOL FARINTERNAL FarCheckObject(LPOLEOBJECT);
  250. OLESTATUS INTERNAL LeQueryCreateFromClip (LPSTR, OLEOPT_RENDER, OLECLIPFORMAT, LONG);
  251. /////////////////////////////////////////////////////////////////////////////
  252. // //
  253. // Routines in DEFCREAT.C //
  254. // //
  255. /////////////////////////////////////////////////////////////////////////////
  256. OLESTATUS FAR PASCAL DefLoadFromStream (LPOLESTREAM, LPSTR, LPOLECLIENT, LHCLIENTDOC, LPSTR, LPOLEOBJECT FAR *, LONG, ATOM, OLECLIPFORMAT);
  257. OLESTATUS FAR PASCAL DefCreateFromClip (LPSTR, LPOLECLIENT, LHCLIENTDOC, LPSTR, LPOLEOBJECT FAR *, OLEOPT_RENDER, OLECLIPFORMAT, LONG);
  258. OLESTATUS FAR PASCAL DefCreateLinkFromClip (LPSTR, LPOLECLIENT, LHCLIENTDOC, LPSTR, LPOLEOBJECT FAR *, OLEOPT_RENDER, OLECLIPFORMAT);
  259. OLESTATUS FAR PASCAL DefCreateFromTemplate (LPSTR, LPOLECLIENT, LPSTR, LHCLIENTDOC, LPSTR, LPOLEOBJECT FAR *, OLEOPT_RENDER, OLECLIPFORMAT);
  260. OLESTATUS FAR PASCAL DefCreate (LPSTR, LPOLECLIENT, LPSTR, LHCLIENTDOC, LPSTR, LPOLEOBJECT FAR *, OLEOPT_RENDER, OLECLIPFORMAT);
  261. OLESTATUS FAR PASCAL DefCreateFromFile (LPSTR, LPOLECLIENT, LPSTR, LPSTR, LHCLIENTDOC, LPSTR, LPOLEOBJECT FAR *, OLEOPT_RENDER, OLECLIPFORMAT);
  262. OLESTATUS FAR PASCAL DefCreateLinkFromFile (LPSTR, LPOLECLIENT, LPSTR, LPSTR, LPSTR, LHCLIENTDOC, LPSTR, LPOLEOBJECT FAR *, OLEOPT_RENDER, OLECLIPFORMAT);
  263. OLESTATUS FAR PASCAL DefCreateInvisible (LPSTR, LPOLECLIENT, LPSTR, LHCLIENTDOC, LPSTR, LPOLEOBJECT FAR *, OLEOPT_RENDER, OLECLIPFORMAT, BOOL);
  264. /////////////////////////////////////////////////////////////////////////////
  265. // //
  266. // Routines in PBHANDLR.C //
  267. // //
  268. /////////////////////////////////////////////////////////////////////////////
  269. OLESTATUS FAR PASCAL PbLoadFromStream (LPOLESTREAM, LPSTR, LPOLECLIENT, LHCLIENTDOC, LPSTR, LPOLEOBJECT FAR *, LONG, ATOM, OLECLIPFORMAT);
  270. OLESTATUS FAR PASCAL PbCreateFromClip (LPSTR, LPOLECLIENT, LHCLIENTDOC, LPSTR, LPOLEOBJECT FAR *, OLEOPT_RENDER, OLECLIPFORMAT, LONG);
  271. OLESTATUS FAR PASCAL PbCreateLinkFromClip (LPSTR, LPOLECLIENT, LHCLIENTDOC, LPSTR, LPOLEOBJECT FAR *, OLEOPT_RENDER, OLECLIPFORMAT);
  272. OLESTATUS FAR PASCAL PbCreateFromTemplate (LPSTR, LPOLECLIENT, LPSTR, LHCLIENTDOC, LPSTR, LPOLEOBJECT FAR *, OLEOPT_RENDER, OLECLIPFORMAT);
  273. OLESTATUS FAR PASCAL PbCreate (LPSTR, LPOLECLIENT, LPSTR, LHCLIENTDOC, LPSTR, LPOLEOBJECT FAR *, OLEOPT_RENDER, OLECLIPFORMAT);
  274. OLESTATUS FAR PASCAL PbCreateFromFile (LPSTR, LPOLECLIENT, LPSTR, LPSTR, LHCLIENTDOC, LPSTR, LPOLEOBJECT FAR *, OLEOPT_RENDER, OLECLIPFORMAT);
  275. OLESTATUS FAR PASCAL PbCreateLinkFromFile (LPSTR, LPOLECLIENT, LPSTR, LPSTR, LPSTR, LHCLIENTDOC, LPSTR, LPOLEOBJECT FAR *, OLEOPT_RENDER, OLECLIPFORMAT);
  276. OLESTATUS FAR PASCAL PbCreateInvisible (LPSTR, LPOLECLIENT, LPSTR, LHCLIENTDOC, LPSTR, LPOLEOBJECT FAR *, OLEOPT_RENDER, OLECLIPFORMAT, BOOL);
  277. /////////////////////////////////////////////////////////////////////////////
  278. // //
  279. // Defines common for le.c, ledde.c, dde.c, doc.c //
  280. // //
  281. /////////////////////////////////////////////////////////////////////////////
  282. // Constants for chekcing whether the instance is SrvrDLL instance.
  283. #define WW_LPTR 0 // ptr tosrvr/doc/item
  284. #define WW_LE 4 // signature
  285. #define WW_HANDLE 6 // instance handle
  286. #define WC_LE 0x4c45 // LE chars
  287. // command flags
  288. #define ACT_SHOW 0x0001 // show the window
  289. #define ACT_ACTIVATE 0x0002 // activate
  290. #define ACT_DOVERB 0x0004 // Run the item
  291. #define ACT_ADVISE 0x0008 // advise for data
  292. #define ACT_REQUEST 0x0010 // request for data
  293. #define ACT_CLOSE 0x0020 // request for advise only on close
  294. #define ACT_UNLAUNCH 0x0040 // unload the server after all the
  295. #define ACT_TERMSRVR 0x0080 // terminate server
  296. #define ACT_TERMDOC 0x0100 // terminate document
  297. #define ACT_NATIVE 0x0200 // only for LNKed objects, if we
  298. // need native data.
  299. #define ACT_MINIMIZE 0x0400 // launch the app minimized
  300. #define ACT_NOLAUNCH 0x0800 // don't launch the server
  301. #define LN_TEMPLATE 0x0000 // create from template
  302. #define LN_NEW 0x1000 // create new
  303. #define LN_EMBACT 0x2000 // activate emb
  304. #define LN_LNKACT 0x3000 // activate link
  305. #define LN_MASK 0xf000 // launch mask
  306. #define LN_SHIFT 12 // shift count for LN_MASK
  307. typedef struct _EDIT_DDE { /* edit_dde */
  308. HANDLE hInst;
  309. int extraTerm;
  310. HWND hClient;
  311. HWND hServer;
  312. BOOL bTerminating;
  313. BOOL bAbort;
  314. BOOL bCallLater; // used in request cases. if this is FALSE
  315. // then OLE_CHANGED is sent to client
  316. int awaitAck;
  317. HANDLE hopt; // Memory block I may have to free
  318. int nAdviseClose; // count of outstanding advises on closes
  319. int nAdviseSave; // count of outstanding advises on save
  320. HANDLE hData; // Poked data/ temp for holding the
  321. // handle in DDE messages
  322. // busy parameters
  323. LONG lParam; // lparam value in case we need to
  324. // repost the message
  325. WORD msg; // busy repost message
  326. WORD wTimer; // timer id.
  327. } EDIT_DDE;
  328. typedef EDIT_DDE NEAR *PEDIT_DDE;
  329. typedef EDIT_DDE FAR *LPEDIT_DDE;
  330. typedef struct _OBJECT_LE { /* object_le */
  331. OBJECT head;
  332. ATOM app;
  333. ATOM topic;
  334. ATOM item;
  335. ATOM aServer;
  336. BOOL bOldLink; // whether a linked object for old link
  337. BOOL bOleServer; // server which supports the verbs
  338. WORD verb; // verb nuymber;
  339. WORD fCmd; // Command flags;
  340. OLEOPT_UPDATE optUpdate;
  341. OLEOPT_UPDATE optNew; // new update options
  342. LPSTR lptemplate; // ptr to the template string, if
  343. // create from template
  344. ATOM aNetName; // network name on which the doc is
  345. char cDrive; // local drive for that network
  346. DWORD dwNetInfo; // LOW WORD = Net type
  347. // HIGH WORD = Driver version
  348. LPOLEOBJECT lpobjPict;
  349. LONG lAppData; // apps data
  350. LONG lHandlerData; // handler data
  351. HANDLE hnative;
  352. HANDLE hLink;
  353. HANDLE hhostNames; // host name block
  354. HANDLE htargetDevice; // target device info
  355. HANDLE hdocDimensions; // document dimensions
  356. HANDLE hextraData; // reqestdata handle
  357. WORD cfExtra; // extra format data
  358. HANDLE hlogpal; // logiccal palette
  359. WORD oldasyncCmd; // previous asynchronous command
  360. WORD asyncCmd; // asynchronous command
  361. BOOL endAsync; // true if we need to send END_RELEASE.
  362. BOOL bAsync; // true if async command on.
  363. WORD mainRtn; // main async routine
  364. WORD subRtn; // step within the main async routine
  365. WORD mainErr; // failure error
  366. WORD subErr; // step error
  367. WORD errHint; // ;error hint
  368. BOOL bSvrClosing; // TRUE - server in the process of
  369. // closing down
  370. BOOL bUnlaunchLater; // Call EmbLnkDelete from EndAsyncCmd
  371. // if this flag is TRUE
  372. HANDLE hSysEdit; // handle to system edit.
  373. PEDIT_DDE pSysEdit; // near ptr to system edit.
  374. HANDLE hDocEdit; // handle to doc level channel
  375. PEDIT_DDE pDocEdit; // near ptr to the doc level channel
  376. } OBJECT_LE;
  377. typedef OBJECT_LE FAR * LPOBJECT_LE;
  378. typedef struct _CLIENTDOC { /* object_le */
  379. char docId[2];
  380. LPOLEOBJECT lpHeadObj;
  381. LPOLEOBJECT lpTailObj;
  382. ATOM aClass;
  383. ATOM aDoc;
  384. HANDLE hdoc;
  385. struct _CLIENTDOC FAR * lpPrevDoc;
  386. struct _CLIENTDOC FAR * lpNextDoc;
  387. } CLIENTDOC;
  388. typedef CLIENTDOC FAR * LPCLIENTDOC;
  389. typedef struct _HOSTNAMES {
  390. WORD clientNameOffset;
  391. WORD documentNameOffset;
  392. BYTE data[];
  393. } HOSTNAMES;
  394. typedef HOSTNAMES FAR * LPHOSTNAMES;
  395. typedef struct _BOUNDSRECT {
  396. WORD defaultWidth;
  397. WORD defaultHeight;
  398. WORD maxWidth;
  399. WORD maxHeight;
  400. } BOUNDSRECT;
  401. typedef BOUNDSRECT FAR *LPBOUNDSRECT;
  402. // AwaitAck values
  403. #define AA_REQUEST 1
  404. #define AA_ADVISE 2
  405. #define AA_POKE 3
  406. #define AA_EXECUTE 4
  407. #define AA_UNADVISE 5
  408. #define AA_INITIATE 6
  409. // Bits for Positive WM_DDE_ACK
  410. #define POSITIVE_ACK 0x8000
  411. /////////////////////////////////////////////////////////////////////////////
  412. // //
  413. // Routines in LE.C //
  414. // //
  415. /////////////////////////////////////////////////////////////////////////////
  416. LPVOID FARINTERNAL LeQueryProtocol (LPOBJECT_LE, LPSTR);
  417. OLESTATUS FARINTERNAL LeRelease (LPOBJECT_LE);
  418. OLESTATUS FARINTERNAL LeClone (LPOBJECT_LE, LPOLECLIENT, LHCLIENTDOC, LPSTR, LPOBJECT_LE FAR *);
  419. OLESTATUS FARINTERNAL LeCopyFromLink (LPOBJECT_LE, LPOLECLIENT, LHCLIENTDOC, LPSTR, LPOBJECT_LE FAR *);
  420. OLESTATUS FARINTERNAL LeEqual (LPOBJECT_LE, LPOBJECT_LE);
  421. OLESTATUS FARINTERNAL LeCopy (LPOBJECT_LE);
  422. OLESTATUS FARINTERNAL LeQueryBounds (LPOBJECT_LE, LPRECT);
  423. OLESTATUS FARINTERNAL LeDraw (LPOBJECT_LE, HDC, LPRECT, LPRECT, HDC);
  424. OLECLIPFORMAT FARINTERNAL LeEnumFormat (LPOBJECT_LE, OLECLIPFORMAT);
  425. OLESTATUS FARINTERNAL LeGetData (LPOBJECT_LE, OLECLIPFORMAT, HANDLE FAR *);
  426. OLESTATUS FARINTERNAL LeRequestData (LPOBJECT_LE, OLECLIPFORMAT);
  427. OLESTATUS FARINTERNAL LeQueryOutOfDate (LPOBJECT_LE);
  428. OLESTATUS FARINTERNAL LeObjectConvert (LPOBJECT_LE, LPSTR, LPOLECLIENT, LHCLIENTDOC, LPSTR, LPOLEOBJECT FAR *);
  429. OLESTATUS FARINTERNAL LeChangeData (LPOBJECT_LE, HANDLE, LPOLECLIENT, BOOL);
  430. LPOBJECT_LE FARINTERNAL LeCreateBlank(LHCLIENTDOC, LPSTR, LONG);
  431. void FARINTERNAL SetExtents (LPOBJECT_LE);
  432. OLESTATUS FARINTERNAL LeSaveToStream (LPOBJECT_LE, LPOLESTREAM);
  433. OLESTATUS FARINTERNAL LeLoadFromStream (LPOLESTREAM, LPOLECLIENT, LHCLIENTDOC, LPSTR, LPOLEOBJECT FAR *, LONG, ATOM, OLECLIPFORMAT);
  434. OLESTATUS INTERNAL LeStreamRead (LPOLESTREAM, LPOBJECT_LE);
  435. OLESTATUS INTERNAL LeStreamWrite (LPOLESTREAM, LPOBJECT_LE);
  436. int FARINTERNAL ContextCallBack (LPVOID, OLE_NOTIFICATION);
  437. void INTERNAL DeleteObjectAtoms (LPOBJECT_LE);
  438. void FARINTERNAL DeleteExtraData (LPOBJECT_LE);
  439. OLESTATUS FARINTERNAL LeGetUpdateOptions (LPOBJECT_LE, OLEOPT_UPDATE FAR *);
  440. OLESTATUS FARINTERNAL LnkPaste (LPOLECLIENT, LHCLIENTDOC, LPSTR, LPOLEOBJECT FAR *, OLEOPT_RENDER, OLECLIPFORMAT, OLECLIPFORMAT);
  441. OLESTATUS FARINTERNAL EmbPaste (LPOLECLIENT, LHCLIENTDOC, LPSTR, LPOLEOBJECT FAR *, OLEOPT_RENDER, OLECLIPFORMAT);
  442. BOOL INTERNAL SetLink (LPOBJECT_LE, HANDLE, LPSTR FAR *);
  443. HANDLE INTERNAL GetLink (LPOBJECT_LE);
  444. void FARINTERNAL SetEmbeddedTopic (LPOBJECT_LE);
  445. OLESTATUS FAR PASCAL LeQueryReleaseStatus (LPOBJECT_LE);
  446. OLESTATUS FAR PASCAL LeQueryReleaseError (LPOBJECT_LE);
  447. OLE_RELEASE_METHOD FAR PASCAL LeQueryReleaseMethod (LPOBJECT_LE);
  448. OLESTATUS FARINTERNAL LeQueryType (LPOBJECT_LE, LPLONG);
  449. OLESTATUS FARINTERNAL LeObjectLong (LPOBJECT_LE, WORD, LPLONG);
  450. void SetNetDrive (LPOBJECT_LE);
  451. /////////////////////////////////////////////////////////////////////////////
  452. // //
  453. // Routines in LEDDE.C //
  454. // //
  455. /////////////////////////////////////////////////////////////////////////////
  456. OLESTATUS FARINTERNAL LeDoVerb (LPOBJECT_LE, WORD, BOOL, BOOL);
  457. OLESTATUS FARINTERNAL LeShow (LPOBJECT_LE, BOOL);
  458. OLESTATUS FARINTERNAL LeQueryOpen (LPOBJECT_LE);
  459. BOOL INTERNAL QueryOpen (LPOBJECT_LE);
  460. OLESTATUS FARINTERNAL LeActivate (LPOBJECT_LE, WORD, BOOL, BOOL, HWND, LPRECT);
  461. OLESTATUS FARINTERNAL LeUpdate (LPOBJECT_LE);
  462. OLESTATUS FARINTERNAL EmbOpen (LPOBJECT_LE, BOOL, BOOL, HWND, LPRECT);
  463. OLESTATUS FARINTERNAL EmbUpdate (LPOBJECT_LE);
  464. OLESTATUS FARINTERNAL EmbOpenUpdate (LPOBJECT_LE);
  465. OLESTATUS FARINTERNAL LnkOpen (LPOBJECT_LE, BOOL, BOOL, HWND, LPRECT);
  466. OLESTATUS FARINTERNAL LnkUpdate (LPOBJECT_LE);
  467. OLESTATUS FARINTERNAL LnkOpenUpdate (LPOBJECT_LE);
  468. OLESTATUS FARINTERNAL LeClose (LPOBJECT_LE);
  469. OLESTATUS FARINTERNAL LeReconnect (LPOBJECT_LE);
  470. OLESTATUS INTERNAL PokeNativeData (LPOBJECT_LE);
  471. BOOL INTERNAL PostMessageToServer (PEDIT_DDE, WORD, LONG);
  472. OLESTATUS FARINTERNAL LeCreateFromTemplate (LPOLECLIENT, LPSTR, LHCLIENTDOC, LPSTR, LPOLEOBJECT FAR *, OLEOPT_RENDER, OLECLIPFORMAT);
  473. OLESTATUS FARINTERNAL LeCreate (LPOLECLIENT, LPSTR, LHCLIENTDOC, LPSTR, LPOLEOBJECT FAR *, OLEOPT_RENDER, OLECLIPFORMAT);
  474. OLESTATUS FARINTERNAL LeCreateInvisible (LPOLECLIENT, LPSTR, LHCLIENTDOC, LPSTR, LPOLEOBJECT FAR *, OLEOPT_RENDER, OLECLIPFORMAT, BOOL);
  475. OLESTATUS FARINTERNAL CreateFromClassOrTemplate (LPOLECLIENT, LPSTR, LPOLEOBJECT FAR *, OLEOPT_RENDER, OLECLIPFORMAT, WORD, LPSTR, LHCLIENTDOC, LPSTR);
  476. OLESTATUS FARINTERNAL CreateEmbLnkFromFile (LPOLECLIENT, LPSTR, LPSTR, LPSTR, LHCLIENTDOC, LPSTR, LPOLEOBJECT FAR *, OLEOPT_RENDER, OLECLIPFORMAT, LONG);
  477. OLESTATUS FARINTERNAL LeSetUpdateOptions (LPOBJECT_LE, OLEOPT_UPDATE);
  478. void INTERNAL AdvisePict (LPOBJECT_LE, ATOM);
  479. void INTERNAL UnAdvisePict (LPOBJECT_LE);
  480. int INTERNAL GetPictType (LPOBJECT_LE);
  481. void INTERNAL AdviseOn (LPOBJECT_LE, int, ATOM);
  482. void INTERNAL UnAdviseOn (LPOBJECT_LE, int);
  483. void INTERNAL RequestOn (LPOBJECT_LE, int);
  484. void INTERNAL RequestPict (LPOBJECT_LE);
  485. OLESTATUS FARINTERNAL LeSetHostNames (LPOBJECT_LE, LPSTR, LPSTR);
  486. OLESTATUS INTERNAL PokeHostNames (LPOBJECT_LE);
  487. OLESTATUS INTERNAL SetHostNamesHandle (LPOBJECT_LE, LPSTR, LPSTR);
  488. void INTERNAL FreePokeData (LPOBJECT_LE, PEDIT_DDE);
  489. OLESTATUS INTERNAL SendPokeData (LPOBJECT_LE, ATOM, HANDLE, OLECLIPFORMAT);
  490. OLESTATUS FARINTERNAL LeSetTargetDevice (LPOBJECT_LE, HANDLE);
  491. OLESTATUS INTERNAL PokeTargetDeviceInfo (LPOBJECT_LE);
  492. OLESTATUS INTERNAL PokeDocDimensions (LPOBJECT_LE);
  493. OLESTATUS FARINTERNAL LeSetBounds (LPOBJECT_LE, LPRECT);
  494. OLESTATUS FARINTERNAL LeSetData (LPOBJECT_LE, OLECLIPFORMAT, HANDLE);
  495. BOOL INTERNAL SendSrvrMainCmd (LPOBJECT_LE, LPSTR);
  496. ATOM INTERNAL ExtendAtom (LPOBJECT_LE, ATOM);
  497. BOOL INTERNAL CreatePictObject (LHCLIENTDOC, LPSTR, LPOBJECT_LE, OLEOPT_RENDER, OLECLIPFORMAT, LPSTR);
  498. BOOL INTERNAL IsSrvrDLLwnd (HWND, HANDLE);
  499. OLESTATUS INTERNAL ChangeDocAndItem (LPOBJECT_LE, HANDLE);
  500. BOOL QueryUnlaunch (LPOBJECT_LE);
  501. BOOL QueryClose (LPOBJECT_LE);
  502. OLESTATUS FARINTERNAL LeSetColorScheme (LPOBJECT_LE, LPLOGPALETTE);
  503. OLESTATUS INTERNAL PokeColorScheme (LPOBJECT_LE);
  504. OLESTATUS FARINTERNAL ProbeAsync (LPOBJECT_LE);
  505. BOOL INTERNAL IsServerValid (LPOBJECT_LE);
  506. BOOL INTERNAL IsWindowValid (HWND);
  507. OLESTATUS FARINTERNAL LeExecute (LPOBJECT_LE, HANDLE, WORD);
  508. void INTERNAL FreeGDIdata (HANDLE, OLECLIPFORMAT);
  509. BOOL INTERNAL CanPutHandleInPokeBlock (LPOBJECT_LE, OLECLIPFORMAT);
  510. /////////////////////////////////////////////////////////////////////////////
  511. // //
  512. // Routines in DDE.C //
  513. // //
  514. /////////////////////////////////////////////////////////////////////////////
  515. long FARINTERNAL DocWndProc(HWND, unsigned, WORD, LONG );
  516. long FARINTERNAL SrvrWndProc(HWND, unsigned, WORD, LONG );
  517. BOOL INTERNAL CheckAtomValid (ATOM);
  518. void INTERNAL HandleAckInitMsg (PEDIT_DDE, HWND);
  519. BOOL INTERNAL HandleAck (LPOBJECT_LE, PEDIT_DDE, DWORD);
  520. void INTERNAL HandleDataMsg (LPOBJECT_LE, HANDLE, ATOM);
  521. void INTERNAL HandleTermMsg (LPOBJECT_LE, PEDIT_DDE, HWND, BOOL);
  522. void INTERNAL HandleTimerMsg (LPOBJECT_LE, PEDIT_DDE);
  523. void INTERNAL SetData (LPOBJECT_LE, HANDLE, int);
  524. BOOL INTERNAL DeleteBusyData (LPOBJECT_LE, PEDIT_DDE);
  525. void INTERNAL DeleteAbortData (LPOBJECT_LE, PEDIT_DDE);
  526. BOOL INTERNAL WaitDDE (HWND, BOOL);
  527. BOOL INTERNAL WaitDDEAck (PEDIT_DDE);
  528. BOOL INTERNAL InitSrvrConv (LPOBJECT_LE, HANDLE);
  529. void INTERNAL TermSrvrConv (LPOBJECT_LE);
  530. void INTERNAL DeleteSrvrEdit (LPOBJECT_LE);
  531. BOOL INTERNAL SrvrExecute (LPOBJECT_LE, HANDLE);
  532. void INTERNAL SendStdExit (LPOBJECT_LE);
  533. void INTERNAL SendStdClose (LPOBJECT_LE);
  534. void INTERNAL SendStdExit (LPOBJECT_LE);
  535. BOOL FARINTERNAL InitDocConv (LPOBJECT_LE, BOOL);
  536. BOOL INTERNAL DocExecute (LPOBJECT_LE, HANDLE);
  537. void INTERNAL TermDocConv (LPOBJECT_LE);
  538. void INTERNAL DeleteDocEdit (LPOBJECT_LE);
  539. HANDLE INTERNAL LeLaunchApp (LPOBJECT_LE);
  540. HANDLE INTERNAL LoadApp (LPSTR, WORD);
  541. int INTERNAL ScanItemOptions (ATOM, int FAR *);
  542. void INTERNAL ChangeDocName (LPOBJECT_LE, LPSTR);
  543. BOOL INTERNAL CanCallback (LPOBJECT_LE, int);
  544. void FARINTERNAL CallEmbLnkDelete (LPOBJECT_LE);
  545. /////////////////////////////////////////////////////////////////////////////
  546. // //
  547. // Picture Object routines used by routines in other modules //
  548. // //
  549. /////////////////////////////////////////////////////////////////////////////
  550. LPOBJECT_BM FARINTERNAL BmCreateBlank (LHCLIENTDOC, LPSTR, LONG);
  551. OLESTATUS FARINTERNAL BmLoadFromStream (LPOLESTREAM, LPOLECLIENT, LHCLIENTDOC, LPSTR, LPOLEOBJECT FAR *, LONG);
  552. OLESTATUS FARINTERNAL BmPaste (LPOLECLIENT, LHCLIENTDOC, LPSTR, LPOLEOBJECT FAR *, LONG);
  553. LPOBJECT_DIB FARINTERNAL DibCreateBlank (LHCLIENTDOC, LPSTR, LONG);
  554. LPOBJECT_DIB FARINTERNAL DibCreateObject (HANDLE, LPOLECLIENT, BOOL, LHCLIENTDOC, LPSTR, LONG);
  555. OLESTATUS FARINTERNAL DibLoadFromStream (LPOLESTREAM, LPOLECLIENT, LHCLIENTDOC, LPSTR, LPOLEOBJECT FAR *, LONG);
  556. OLESTATUS FARINTERNAL DibPaste (LPOLECLIENT, LHCLIENTDOC, LPSTR, LPOLEOBJECT FAR *, LONG);
  557. LPOBJECT_MF FARINTERNAL MfCreateBlank (LHCLIENTDOC, LPSTR, LONG);
  558. LPOBJECT_MF FARINTERNAL MfCreateObject (HANDLE, LPOLECLIENT, BOOL, LHCLIENTDOC, LPSTR, LONG);
  559. OLESTATUS FARINTERNAL MfLoadFromStream (LPOLESTREAM, LPOLECLIENT, LHCLIENTDOC, LPSTR, LPOLEOBJECT FAR *, LONG);
  560. OLESTATUS FARINTERNAL MfPaste (LPOLECLIENT, LHCLIENTDOC, LPSTR, LPOLEOBJECT FAR *, LONG);
  561. LPOBJECT_GEN FARINTERNAL GenCreateBlank (LHCLIENTDOC, LPSTR, LONG, ATOM);
  562. OLESTATUS FARINTERNAL GenLoadFromStream (LPOLESTREAM, LPOLECLIENT, LHCLIENTDOC, LPSTR, LPOLEOBJECT FAR *, LONG, ATOM, OLECLIPFORMAT);
  563. OLESTATUS FARINTERNAL GenPaste (LPOLECLIENT, LHCLIENTDOC, LPSTR, LPOLEOBJECT FAR *, LPSTR, OLECLIPFORMAT, LONG);
  564. /////////////////////////////////////////////////////////////////////////////
  565. // //
  566. // Routines in MAIN.C //
  567. // //
  568. /////////////////////////////////////////////////////////////////////////////
  569. void FARINTERNAL UnloadDll (void);
  570. int FARINTERNAL LoadDll (LPSTR);
  571. void FARINTERNAL DecreaseHandlerObjCount (int);
  572. void FARINTERNAL RemoveLinkStringFromTopic (LPOBJECT_LE);
  573. OLESTATUS FARINTERNAL CreatePictFromClip (LPOLECLIENT, LHCLIENTDOC, LPSTR, LPOLEOBJECT FAR *, OLEOPT_RENDER, OLECLIPFORMAT, LPSTR, LONG);
  574. OLESTATUS FARINTERNAL CreatePackageFromClip (LPOLECLIENT, LHCLIENTDOC, LPSTR, LPOLEOBJECT FAR *, OLEOPT_RENDER, OLECLIPFORMAT, LONG);
  575. /////////////////////////////////////////////////////////////////////////////
  576. // //
  577. // Routines in UTILS.C //
  578. // //
  579. /////////////////////////////////////////////////////////////////////////////
  580. BOOL PutStrWithLen (LPOLESTREAM, LPSTR);
  581. BOOL GetStrWithLen (LPOLESTREAM, LPSTR);
  582. ATOM GetAtomFromStream (LPOLESTREAM);
  583. BOOL PutAtomIntoStream (LPOLESTREAM, ATOM);
  584. BOOL GetBytes (LPOLESTREAM, LPSTR, LONG);
  585. BOOL PutBytes (LPOLESTREAM, LPSTR, LONG);
  586. BOOL QueryApp (LPSTR, LPSTR, LPSTR);
  587. HANDLE MapStrToH (LPSTR);
  588. void UtilMemClr (PSTR, WORD);
  589. BOOL QueryHandler (WORD);
  590. OLESTATUS INTERNAL FileExists (LPOBJECT_LE);
  591. ATOM FARINTERNAL GetAppAtom (LPSTR);
  592. HANDLE FARINTERNAL DuplicateGlobal (HANDLE, WORD);
  593. HANDLE FARINTERNAL CopyData (LPSTR, DWORD);
  594. ATOM FARINTERNAL DuplicateAtom (ATOM);
  595. BOOL FARINTERNAL UtilQueryProtocol (LPOBJECT_LE, LPSTR);
  596. BOOL FARINTERNAL CmpGlobals (HANDLE, HANDLE);
  597. void FARINTERNAL ConvertToHimetric(LPPOINT);
  598. BOOL FARINTERNAL QueryVerb (LPOBJECT_LE, WORD, LPSTR, LONG);
  599. BOOL FARINTERNAL MapExtToClass (LPSTR, LPSTR, int);
  600. int FARINTERNAL GlobalGetAtomLen (ATOM);
  601. void FARINTERNAL UtilMemCpy (LPSTR, LPSTR, DWORD);
  602. BOOL FARINTERNAL UtilMemCmp (LPSTR, LPSTR, DWORD);
  603. BOOL FARINTERNAL IsObjectBlank (LPOBJECT_LE);
  604. OLESTATUS FARINTERNAL ObjQueryName (LPOLEOBJECT, LPSTR, WORD FAR *);
  605. OLESTATUS FARINTERNAL ObjRename (LPOLEOBJECT, LPSTR);
  606. void INTERNAL SetExeAtom (LPOBJECT_LE);
  607. // !!!make a routine and let the macro call the routine
  608. // definitions related to the asynchronous operations.
  609. #define WAIT_FOR_ASYNC_MSG(lpobj) { \
  610. lpobj->subRtn++; \
  611. if (lpobj->bAsync){ \
  612. lpobj->endAsync = TRUE; \
  613. return OLE_WAIT_FOR_RELEASE; \
  614. } \
  615. }
  616. #define STEP_NOP(lpobj) lpobj->subRtn++;
  617. // !!! Assumes all the creates are in order
  618. #define PROBE_CREATE_ASYNC(lpobj) \
  619. if (lpobj->asyncCmd >= OLE_CREATE && \
  620. lpobj->asyncCmd <= OLE_CREATEINVISIBLE) {\
  621. if(ProbeAsync(lpobj) == OLE_BUSY)\
  622. return OLE_BUSY;\
  623. }
  624. #define PROBE_OBJECT_BLANK(lpobj) \
  625. if (lpobj->asyncCmd >= OLE_CREATE && \
  626. lpobj->asyncCmd <= OLE_CREATEFROMFILE) { \
  627. if ((ProbeAsync(lpobj) == OLE_BUSY) && IsObjectBlank(lpobj)) \
  628. return OLE_ERROR_BLANK;\
  629. }
  630. #define PROBE_ASYNC(lpobj)\
  631. if(ProbeAsync(lpobj) == OLE_BUSY)\
  632. return OLE_BUSY;
  633. #define IS_SVRCLOSING(lpobj)\
  634. ((lpobj->bUnlaunchLater || lpobj->bSvrClosing) ? TRUE : FALSE)
  635. #define PROBE_SVRCLOSING(lpobj)\
  636. if (IS_SVRCLOSING(lpobj)) \
  637. return OLE_ERROR_NOT_OPEN; \
  638. #define CLEAR_STEP_ERROR(lpobj) lpobj->subErr = OLE_OK;
  639. #define SKIP_TO(a, b) if (a) goto b;
  640. #define RESETERR(lpobj) lpobj->mainErr = OLE_OK
  641. #define SETSTEP(lpobj, no) lpobj->subRtn = no
  642. #define SETERRHINT(lpobj, no) lpobj->errHint = no
  643. #define CLEARASYNCCMD(lpobj) lpobj->asyncCmd = OLE_NONE
  644. // routines.
  645. BOOL ProcessErr (LPOBJECT_LE);
  646. void InitAsyncCmd (LPOBJECT_LE, WORD, WORD);
  647. void NextAsyncCmd (LPOBJECT_LE, WORD);
  648. void ScheduleAsyncCmd (LPOBJECT_LE);
  649. OLESTATUS EndAsyncCmd (LPOBJECT_LE);
  650. OLESTATUS DocShow (LPOBJECT_LE);
  651. OLESTATUS DocRun (LPOBJECT_LE);
  652. void SendStdShow (LPOBJECT_LE);
  653. OLESTATUS EmbLnkClose (LPOBJECT_LE);
  654. OLESTATUS LnkSetUpdateOptions (LPOBJECT_LE);
  655. OLESTATUS EmbSrvrUnlaunch (LPOBJECT_LE);
  656. OLESTATUS LnkChangeLnk (LPOBJECT_LE);
  657. OLESTATUS RequestData (LPOBJECT_LE, OLECLIPFORMAT);
  658. OLESTATUS FARINTERNAL EmbLnkDelete(LPOBJECT_LE);
  659. void FARINTERNAL FarInitAsyncCmd(LPOBJECT_LE, WORD, WORD);
  660. // async command routines.
  661. #define EMBLNKDELETE 1
  662. #define LNKOPENUPDATE 2
  663. #define DOCSHOW 3
  664. #define EMBOPENUPDATE 4
  665. #define EMBLNKCLOSE 5
  666. #define LNKSETUPDATEOPTIONS 6
  667. #define LNKCHANGELNK 7
  668. #define REQUESTDATA 8
  669. #define DOCRUN 9
  670. /////////////////////////////////////////////////////////////////////////////
  671. // //
  672. // Routines in DOC.C //
  673. // //
  674. /////////////////////////////////////////////////////////////////////////////
  675. BOOL FARINTERNAL CheckClientDoc (LPCLIENTDOC);
  676. void FARINTERNAL DocAddObject (LPCLIENTDOC, LPOLEOBJECT, LPSTR);
  677. void FARINTERNAL DocDeleteObject (LPOLEOBJECT);
  678. LPOLEOBJECT INTERNAL DocGetNextObject (LPCLIENTDOC, LPOLEOBJECT);
  679. /////////////////////////////////////////////////////////////////////////////
  680. // //
  681. // Routines in NET.C //
  682. // //
  683. /////////////////////////////////////////////////////////////////////////////
  684. #define IDD_DRIVE 500
  685. #define IDD_PASSWORD 501
  686. #define IDD_PATH 502
  687. #define IDS_NETERR 600
  688. #define IDS_NETCONERRMSG 601
  689. #define IDS_FILENOTFOUNDMSG 602
  690. #define IDS_BADPATHMSG 603
  691. OLESTATUS FARINTERNAL SetNetName (LPOBJECT_LE);
  692. BOOL FARINTERNAL SetNextNetDrive (LPOBJECT_LE, int FAR *, LPSTR);
  693. OLESTATUS FARINTERNAL CheckNetDrive (LPOBJECT_LE, BOOL);
  694. OLESTATUS INTERNAL FixNet (LPOBJECT_LE, LPSTR, BOOL);
  695. OLESTATUS INTERNAL ConnectNet (LPOBJECT_LE, LPSTR);
  696. BOOL FARINTERNAL ChangeTopic (LPOBJECT_LE);
  697. VOID INTERNAL FillDrives (HWND);
  698. int FAR PASCAL ConnectDlgProc(HWND, WORD, WORD, DWORD);
  699. /////////////////////////////////////////////////////////////////////////////
  700. // //
  701. // Routines in OLE.ASM //
  702. // //
  703. /////////////////////////////////////////////////////////////////////////////
  704. WORD GetGDIds (DWORD);
  705. WORD IsMetaDC (HDC, WORD);
  706. /////////////////////////////////////////////////////////////////////////////
  707. // //
  708. // Routines in ERROR.C //
  709. // //
  710. /////////////////////////////////////////////////////////////////////////////
  711. OLESTATUS FARINTERNAL ObjQueryType (LPOLEOBJECT, LPLONG);
  712. OLESTATUS FARINTERNAL ObjQuerySize (LPOLEOBJECT, DWORD FAR *);
  713. DWORD PASCAL FAR DllPut (LPOLESTREAM, LPSTR, DWORD);
  714. HANDLE FARINTERNAL DuplicateGDIdata (HANDLE, OLECLIPFORMAT);
  715. /////////////////////////////////////////////////////////////////////////////
  716. // //
  717. // Routines in BM.C //
  718. // //
  719. /////////////////////////////////////////////////////////////////////////////
  720. HBITMAP FARINTERNAL BmDuplicate (HBITMAP, DWORD FAR *, LPBITMAP);