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.

168 lines
4.0 KiB

  1. /* packager.h - Constants, types, and exports from the main module.
  2. */
  3. #include <windows.h>
  4. #define STRSAFE_NO_DEPRECATE
  5. #include "strsafe.h"
  6. #ifndef ARRAYSIZE
  7. #define ARRAYSIZE(x) (sizeof(x)/sizeof(x[0]))
  8. #endif
  9. #ifdef STRICT
  10. # undef STRICT
  11. # define PACKGR_STRICT
  12. #endif
  13. #define SERVERONLY
  14. #include <ole.h>
  15. #ifdef PACKGR_STRICT
  16. # define STRICT
  17. # undef PACKGR_STRICT
  18. #endif
  19. #include "ids.h"
  20. #define HIMETRIC_PER_INCH 2540 // Number of HIMETRIC units per inch
  21. #define DEF_LOGPIXELSX 96 // Default values for pixels per
  22. #define DEF_LOGPIXELSY 96 // logical inch
  23. #define KEYNAMESIZE 300 // Maximum registration key length
  24. #define CCLIENTNAMEMAX 50 // Maximum length of client app name
  25. #define CBCMDLINKMAX 500
  26. #define CBMESSAGEMAX 128
  27. #define CBSTRINGMAX 256 // Maximum lenght of a string in the res.
  28. #define CBSHORTSTRING 20
  29. #define CBFILTERMAX 50 // Max # chars in a filter specification
  30. #define CBPATHMAX 260 // Most chars in a fully qual. filename
  31. #define CharCountOf(a) (sizeof(a) / sizeof(a[0]))
  32. #define CITEMSMAX 100
  33. #define APPEARANCE 0
  34. #define CONTENT 1
  35. #define CCHILDREN 2 // Number of panes which precede
  36. #define OLE_PLAY 0
  37. #define OLE_EDIT 1
  38. #define WM_FIXSCROLL (WM_USER+100)
  39. #define WM_REDRAW (WM_USER+101)
  40. #define WM_READEMBEDDED (WM_USER+102)
  41. #define CHAR_SPACE TEXT(' ')
  42. #define CHAR_QUOTE TEXT('"')
  43. #define SZ_QUOTE TEXT("\"")
  44. typedef enum
  45. {
  46. NOTHING,
  47. CMDLINK,
  48. ICON,
  49. PEMBED,
  50. PICTURE
  51. } PANETYPE;
  52. typedef enum
  53. {
  54. SOP_FILE,
  55. SOP_MEMORY
  56. }
  57. STREAMOP;
  58. typedef struct _APPSTREAM
  59. {
  60. LPOLESTREAMVTBL lpstbl;
  61. INT fh;
  62. } APPSTREAM, *LPAPPSTREAM;
  63. typedef struct _EMBED // embed
  64. {
  65. ATOM aFileName;
  66. ATOM aTempName;
  67. DWORD dwSize;
  68. HANDLE hContents;
  69. HANDLE hdata;
  70. HANDLE hTask;
  71. HANDLE hSvrInst;
  72. BOOL bOleSvrFile;
  73. LPOLECLIENT lpclient; // At activation time we check whether the file
  74. LPOLEOBJECT lpLinkObj; // is a OLE server file. If so, we will create
  75. // a link to it, and activate it in OLE fashion
  76. } EMBED, *LPEMBED;
  77. typedef struct _CML // cml
  78. {
  79. HANDLE hdata;
  80. RECT rc; // HACK: Same location as in PICT
  81. BOOL fCmdIsLink;
  82. CHAR szCommand[CBCMDLINKMAX];
  83. } CML, *LPCML;
  84. typedef struct _IC // ic
  85. {
  86. HANDLE hdata;
  87. HICON hDlgIcon;
  88. CHAR szIconPath[CBPATHMAX];
  89. CHAR szIconText[CBPATHMAX];
  90. INT iDlgIcon;
  91. } IC, *LPIC;
  92. typedef struct _PICT // pict
  93. {
  94. HANDLE hdata;
  95. RECT rc; // HACK: Same location as in CML
  96. LPOLEOBJECT lpObject;
  97. BOOL fNotReady; // TRUE if object creation is not complete
  98. } PICT, *LPPICT;
  99. typedef struct _SAMPSRVR // srvr
  100. {
  101. OLESERVER olesrvr; // Server
  102. HANDLE hsrvr; // Handle to server memory block
  103. LHSERVER lhsrvr; // Registration handle
  104. } PBSRVR, *LPSAMPSRVR;
  105. typedef struct _SAMPDOC // doc
  106. {
  107. OLESERVERDOC oledoc; // Document
  108. HANDLE hdoc; // Handle to document memory block
  109. LHSERVERDOC lhdoc; // Registration handle
  110. ATOM aName; // Document name atom
  111. } PBDOC, *LPSAMPDOC;
  112. typedef struct _SAMPITEM // item
  113. {
  114. OLEOBJECT oleobject; // Object
  115. HANDLE hitem; // Handle to item memory block
  116. LPOLECLIENT lpoleclient;
  117. INT ref; // # of references to document
  118. ATOM aName; // Item name atom
  119. } ITEM, *LPSAMPITEM;
  120. #include "globals.h"
  121. #include "function.h"
  122. #if DBG_PRNT
  123. #define DPRINT(s) OutputDebugString(TEXT(s) TEXT("\n"))
  124. #else
  125. #define DPRINT(s)
  126. #endif