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.

195 lines
11 KiB

  1. /**INC+**********************************************************************/
  2. /* */
  3. /* adcgcnst.h */
  4. /* */
  5. /* DC-Groupware common constants - portable include file. */
  6. /* */
  7. /* Copyright(c) Microsoft 1996-1997 */
  8. /* */
  9. /****************************************************************************/
  10. /* Changes: */
  11. /* */
  12. // $Log: Y:/logs/h/dcl/adcgcnst.h_v $
  13. //
  14. // Rev 1.7 05 Sep 1997 15:52:12 KH
  15. // SFR1346: Define user message constants
  16. //
  17. // Rev 1.6 20 Aug 1997 10:29:44 NL
  18. // SFR1312: add DCS_RC_BUSY
  19. //
  20. // Rev 1.5 15 Aug 1997 16:13:24 OBK
  21. // SFR1133: Kernelisation: remove unused constants
  22. //
  23. // Rev 1.4 06 Aug 1997 10:41:00 AK
  24. // SFR1016: Complete removal of DCCHAR etc
  25. //
  26. // Rev 1.3 23 Jul 1997 10:47:52 mr
  27. // SFR1079: Merged \server\h duplicates to \h\dcl
  28. //
  29. // Rev 1.1 19 Jun 1997 21:44:18 OBK
  30. // SFR0000: Start of RNS codebase
  31. /* */
  32. /**INC-**********************************************************************/
  33. /****************************************************************************/
  34. /* CONTENTS */
  35. /* ======== */
  36. /* This file contains constants for all: */
  37. /* */
  38. /* - names of shared memory blocks, locks and files */
  39. /* - base and limit values by component for return values and events */
  40. /* */
  41. /* used by DC-Groupware components. */
  42. /* */
  43. /* The rationale for this file is to make it easier to detect name clashes */
  44. /* between components. Therefore, even if you don't expect anyone else to */
  45. /* use your mutex, file, etc., you MUST include its name in here to ensure */
  46. /* that it doesn't happen inadvertently. */
  47. /****************************************************************************/
  48. #ifndef _H_ADCGCNST
  49. #define _H_ADCGCNST
  50. /****************************************************************************/
  51. /* */
  52. /* INCLUDES */
  53. /* */
  54. /****************************************************************************/
  55. /****************************************************************************/
  56. /* Include the proxy header. This will then include the appropriate OS */
  57. /* specific header for us. */
  58. /****************************************************************************/
  59. #include <wdcgcnst.h>
  60. /****************************************************************************/
  61. /* */
  62. /* CONSTANTS */
  63. /* */
  64. /****************************************************************************/
  65. /****************************************************************************/
  66. /* Give numbers to our operating systems. */
  67. /****************************************************************************/
  68. #define WIN_31 1
  69. #define MAC_S7 3
  70. #define WIN_95 4
  71. #define WIN_95_32 5
  72. #define WIN_NT 6
  73. /****************************************************************************/
  74. /* Limits */
  75. /****************************************************************************/
  76. #define MAX_DCUINT16 65535
  77. /****************************************************************************/
  78. /* Drive and directory separators. */
  79. /****************************************************************************/
  80. #define DC_MAX_PATH MAX_PATH
  81. /****************************************************************************/
  82. /* Return codes */
  83. /* ============ */
  84. /* This section lists the ranges available for each component when defining */
  85. /* its return codes. A component must not define return codes outside its */
  86. /* permitted range. The following ranges are currently defined: */
  87. /* */
  88. /* 0x0b00 - 0x0bFF : Share programming */
  89. /* 0x0f00 - 0x0fFF : Common functions */
  90. /* 0x1100 - 0x11FF : Trace functions */
  91. /* */
  92. /****************************************************************************/
  93. #define SPI_BASE_RC ((DCUINT16) 0x0B00)
  94. #define SPI_LAST_RC ((DCUINT16) 0x0BFF)
  95. #define COM_BASE_RC ((DCUINT16) 0x0F00)
  96. #define COM_LAST_RC ((DCUINT16) 0x0FFF)
  97. #define TRC_BASE_RC ((DCUINT16) 0x1000)
  98. #define TRC_LAST_RC ((DCUINT16) 0x10FF)
  99. /****************************************************************************/
  100. /* DC-Share return codes */
  101. /* ===================== */
  102. /* These codes are intended to be very specific, such that the error code */
  103. /* (when in the trace log) clearly identifies the specific class of error, */
  104. /* as follows: */
  105. /* */
  106. /* DCS_RC_OK : OK */
  107. /* DCS_RC_ERR_LOGIC : DC-Share internal logic */
  108. /* DCS_RC_ERR_PARAM : DC-Share internal parameter error */
  109. /* DCS_RC_ERR_MEMORY : allocating memory */
  110. /* DCS_RC_ERR_MEMLOCK : locking memory */
  111. /* DCS_RC_ERR_STRING : loading strings from resources */
  112. /* DCS_RC_ERR_LOADBITMAP : loading bitmaps or icons from resources */
  113. /* DCS_RC_ERR_PROCADDR : getting a proc address */
  114. /* DCS_RC_ERR_WINDOW : creating/registering Windows windows/classes */
  115. /* DCS_RC_ERR_HOOK : setting a Windows hook */
  116. /* DCS_RC_ERR_MSGQUEUE : creating/manipulating Windows message queues */
  117. /* DCS_RC_ERR_BITMAP : creating a Windows bitmap */
  118. /* DCS_RC_ERR_DC : creating/querying Windows DCs */
  119. /* DCS_RC_ERR_OBJECT : creating Windows objects (eg Palettes, Pens, ...)*/
  120. /* DCS_RC_ERR_MMTIMER : initialising multimedia timer */
  121. /* */
  122. /****************************************************************************/
  123. #define DC_RC_OK ((DCUINT16) 0)
  124. #define DCS_RC_OK 0
  125. #define DCS_RC_ERR_LOGIC 2
  126. #define DCS_RC_ERR_PARAM 3
  127. #define DCS_RC_ERR_MEMORY 4
  128. #define DCS_RC_ERR_MEMLOCK 5
  129. #define DCS_RC_ERR_STRING 6
  130. #define DCS_RC_ERR_LOADBITMAP 7
  131. #define DCS_RC_ERR_PROCADDR 8
  132. #define DCS_RC_ERR_WINDOW 9
  133. #define DCS_RC_ERR_HOOK 10
  134. #define DCS_RC_ERR_MSGQUEUE 11
  135. #define DCS_RC_ERR_BITMAP 12
  136. #define DCS_RC_ERR_DC 13
  137. #define DCS_RC_ERR_OBJECT 14
  138. #define DCS_RC_ERR_MMTIMER 15
  139. #define DCS_RC_FAIL_GENERAL 16
  140. #define DCS_RC_FAIL_RESOURCE 17
  141. #define DCS_RC_BUSY 18
  142. /****************************************************************************/
  143. /* Shared memory block names */
  144. /* ========================= */
  145. /* This section lists the shared memory block names used by each component. */
  146. /****************************************************************************/
  147. /****************************************************************************/
  148. /* INI file section names for each of the DC-Groupware components. */
  149. /****************************************************************************/
  150. #define TRC_INI_SECTION_NAME _T("Trace")
  151. #define DCS_INI_SECTION_NAME L"Share"
  152. #define PRI_INI_SECTION_NAME L"PropertyIndex"
  153. #define PRD_INI_SECTION_NAME L"PropertyDefault"
  154. #define PRO_INI_SECTION_NAME L"PropertyOverride"
  155. /****************************************************************************/
  156. /* Null definitions. */
  157. /****************************************************************************/
  158. #define NULL_HWND ((HWND)0)
  159. #define NULL_DCWINID ((DCWINID)0)
  160. #define NULL_DCAPPID ((DCAPPID)0)
  161. #define NULL_DCPALID ((DCPALID)0)
  162. #define NULL_DCREGIONID ((DCREGIONID)0)
  163. /****************************************************************************/
  164. /* Win3.1 doesn't have WM_APP, so we define it here to be well separated */
  165. /* from WM_USER. As long as it's less than 0x8000, we're OK. */
  166. /****************************************************************************/
  167. #ifdef OS_WIN16
  168. #define WM_APP WM_USER+0x1000
  169. #endif
  170. /****************************************************************************/
  171. /* User defined messages. */
  172. /****************************************************************************/
  173. #define DUC_TD_MESSAGE_BASE (WM_APP + 0)
  174. #define DUC_CD_MESSAGE_BASE (WM_APP + 10)
  175. #define DUC_UI_MESSAGE_BASE (WM_APP + 20)
  176. #define DUC_CO_MESSAGE_BASE (WM_APP + 30)
  177. #endif /* _H_ADCGCNST */