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.

108 lines
4.5 KiB

  1. /*
  2. * global.h
  3. *
  4. * Created by Microsoft Corporation.
  5. * (c) Copyright Microsoft Corp. 1990 - 1992 All Rights Reserved
  6. */
  7. //*** CONSTANTS ***
  8. #define PROTOCOL_STRLEN 15 //* protocol name string size
  9. #define CFILTERMAX 20 //* Max # filters
  10. //* Max # chars/filter
  11. #define CBFILTERMAX (100 * CFILTERMAX)
  12. #define CBPATHMAX 250 //* max qualified file name
  13. #define CBOBJNAMEMAX 14 //* maximum length of object name
  14. #define CBVERBTEXTMAX 30 //* maximum length of verb text
  15. #define CBVERBNUMBMAX 8 //* maximum number of verbs
  16. #define OBJECT_LINK_MAX 256*3 //* maximum size of object link data
  17. #define CDIGITSMAX 5
  18. #define KEYNAMESIZE 300 //* Maximum registration key length
  19. #define RETRY 3
  20. //* protocol name strings
  21. #define STDFILEEDITING ((LPSTR)"StdFileEditing")
  22. #define STATICP ((LPSTR)"Static")
  23. //* object name prefixes
  24. #define OBJPREFIX ((LPSTR)"CliDemo #")
  25. #define OBJCLONE ((LPSTR)"CliDemo1#")
  26. #define OBJTEMP ((LPSTR)"CliDemo2#")
  27. #define DOC_CLEAN 0 //* Dirty() methods
  28. #define DOC_DIRTY 1
  29. #define DOC_UNDIRTY 2
  30. #define DOC_QUERY 3
  31. #define OLE_OBJ_RELEASE FALSE //* object deletion type
  32. #define OLE_OBJ_DELETE TRUE
  33. #define WM_ERROR WM_USER + 1 //* user defined messages
  34. #define WM_INIT WM_USER + 2
  35. #define WM_DELETE WM_USER + 3
  36. #define WM_RETRY WM_USER + 4
  37. #define WM_CHANGE WM_USER + 5
  38. #define RD_CANCEL 0x00000001
  39. #define RD_RETRY 0x00000002
  40. //*** TYPES ***
  41. typedef struct _APPSTREAM FAR *LPAPPSTREAM;
  42. typedef struct _APPSTREAM {
  43. OLESTREAM olestream;
  44. INT fh;
  45. } APPSTREAM;
  46. typedef struct _APPITEM *APPITEMPTR;
  47. typedef struct _APPITEM { //* Application item
  48. OLECLIENT oleclient;
  49. HWND hwnd;
  50. LPOLEOBJECT lpObject; //* OLE object pointers
  51. LPOLEOBJECT lpObjectUndo; //* undo object
  52. LONG otObject; //* OLE object type
  53. LONG otObjectUndo;
  54. OLEOPT_UPDATE uoObject; //* OLE object update option
  55. OLEOPT_UPDATE uoObjectUndo; //* link name atom
  56. ATOM aLinkName; //* Save the link's document name
  57. ATOM aLinkUndo; //* Save the link's document name
  58. LPSTR lpLinkData; //* pointer to link data
  59. BOOL fVisible; //* TRUE: item is to be displayed
  60. BOOL fOpen; //* server open? --for undo objects
  61. BOOL fRetry; //* retry flag for busy servers
  62. BOOL fNew;
  63. BOOL fServerChangedBounds;
  64. RECT rect; //* bounding rectangle
  65. LHCLIENTDOC lhcDoc; //* client document handle
  66. ATOM aServer;
  67. } APPITEM;
  68. typedef struct _RETRY *RETRYPTR;
  69. typedef struct _RETRY { //* Application item
  70. LPSTR lpserver;
  71. BOOL bCancel;
  72. APPITEMPTR paItem;
  73. } RETRYSTRUCT;
  74. //*** GLOBALS ***
  75. extern OLECLIPFORMAT vcfLink; //* ObjectLink clipboard format
  76. extern OLECLIPFORMAT vcfNative; //* Native clipboard format
  77. extern OLECLIPFORMAT vcfOwnerLink; //* OwnerLink clipboard format
  78. extern HANDLE hInst; //* instance handle
  79. extern HWND hwndFrame; //* main window handle
  80. extern HANDLE hAccTable; //* accelerator table
  81. extern HWND hwndProp; //* link properties dialog
  82. extern HWND hRetry; //* retry dialog box handle
  83. extern INT cOleWait; //* wait for asyncc commands
  84. extern INT iObjects; //* object count
  85. extern INT iObjectNumber; //* unique name id
  86. extern CHAR szItemClass[]; //* item class name
  87. extern CHAR szDefExtension[]; //* default file extension
  88. extern CHAR szAppName[]; //* application name
  89. extern BOOL fLoadFile; //* load file flag
  90. extern CHAR szFileName[]; //* open file name
  91. extern FARPROC lpfnTimerProc; //* pointer to timer callback function
  92.