xtliberror.h 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286
  1. /*
  2. Microsoft Developer Support
  3. Copyright (c) 1992 Microsoft Corporation
  4. This file contains the message definitions for the Win32
  5. messages.exe sample program.
  6. -------------------------------------------------------------------------
  7. HEADER SECTION
  8. The header section defines names and language identifiers for use
  9. by the message definitions later in this file. The MessageIdTypedef,
  10. SeverityNames, FacilityNames, and LanguageNames keywords are
  11. optional and not required.
  12. The MessageIdTypedef keyword gives a typedef name that is used in a
  13. type cast for each message code in the generated include file. Each
  14. message code appears in the include file with the format: #define
  15. name ((type) 0xnnnnnnnn) The default value for type is empty, and no
  16. type cast is generated. It is the programmer's responsibility to
  17. specify a typedef statement in the application source code to define
  18. the type. The type used in the typedef must be large enough to
  19. accomodate the entire 32-bit message code.
  20. The SeverityNames keyword defines the set of names that are allowed
  21. as the value of the Severity keyword in the message definition. The
  22. set is delimited by left and right parentheses. Associated with each
  23. severity name is a number that, when shifted left by 30, gives the
  24. bit pattern to logical-OR with the Facility value and MessageId
  25. value to form the full 32-bit message code. The default value of
  26. this keyword is:
  27. SeverityNames=(
  28. Success=0x0
  29. Informational=0x1
  30. Warning=0x2
  31. Error=0x3
  32. )
  33. Severity values occupy the high two bits of a 32-bit message code.
  34. Any severity value that does not fit in two bits is an error. The
  35. severity codes can be given symbolic names by following each value
  36. with :name
  37. The FacilityNames keyword defines the set of names that are allowed
  38. as the value of the Facility keyword in the message definition. The
  39. set is delimited by left and right parentheses. Associated with each
  40. facility name is a number that, when shift it left by 16 bits, gives
  41. the bit pattern to logical-OR with the Severity value and MessageId
  42. value to form the full 32-bit message code. The default value of
  43. this keyword is:
  44. FacilityNames=(
  45. System=0x0FF
  46. Application=0xFFF
  47. )
  48. Facility codes occupy the low order 12 bits of the high order
  49. 16-bits of a 32-bit message code. Any facility code that does not
  50. fit in 12 bits is an error. This allows for 4,096 facility codes.
  51. The first 256 codes are reserved for use by the system software. The
  52. facility codes can be given symbolic names by following each value
  53. with :name
  54. The LanguageNames keyword defines the set of names that are allowed
  55. as the value of the Language keyword in the message definition. The
  56. set is delimited by left and right parentheses. Associated with each
  57. language name is a number and a file name that are used to name the
  58. generated resource file that contains the messages for that
  59. language. The number corresponds to the language identifier to use
  60. in the resource table. The number is separated from the file name
  61. with a colon. The initial value of LanguageNames is:
  62. LanguageNames=(English=1:MSG00001)
  63. Any new names in the source file which don't override the built-in
  64. names are added to the list of valid languages. This allows an
  65. application to support private languages with descriptive names.
  66. -------------------------------------------------------------------------
  67. MESSAGE DEFINITION SECTION
  68. Following the header section is the body of the Message Compiler
  69. source file. The body consists of zero or more message definitions.
  70. Each message definition begins with one or more of the following
  71. statements:
  72. MessageId = [number|+number]
  73. Severity = severity_name
  74. Facility = facility_name
  75. SymbolicName = name
  76. The MessageId statement marks the beginning of the message
  77. definition. A MessageID statement is required for each message,
  78. although the value is optional. If no value is specified, the value
  79. used is the previous value for the facility plus one. If the value
  80. is specified as +number then the value used is the previous value
  81. for the facility, plus the number after the plus sign. Otherwise, if
  82. a numeric value is given, that value is used. Any MessageId value
  83. that does not fit in 16 bits is an error.
  84. The Severity and Facility statements are optional. These statements
  85. specify additional bits to OR into the final 32-bit message code. If
  86. not specified they default to the value last specified for a message
  87. definition. The initial values prior to processing the first message
  88. definition are:
  89. Severity=Success
  90. Facility=Application
  91. The value associated with Severity and Facility must match one of
  92. the names given in the FacilityNames and SeverityNames statements in
  93. the header section. The SymbolicName statement allows you to
  94. associate a C/C++ symbolic constant with the final 32-bit message
  95. code.
  96. */
  97. /* COMMON errors */
  98. //
  99. // Values are 32 bit values layed out as follows:
  100. //
  101. // 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
  102. // 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
  103. // +---+-+-+-----------------------+-------------------------------+
  104. // |Sev|C|R| Facility | Code |
  105. // +---+-+-+-----------------------+-------------------------------+
  106. //
  107. // where
  108. //
  109. // Sev - is the severity code
  110. //
  111. // 00 - Success
  112. // 01 - Informational
  113. // 10 - Warning
  114. // 11 - Error
  115. //
  116. // C - is the Customer code flag
  117. //
  118. // R - is a reserved bit
  119. //
  120. // Facility - is the facility code
  121. //
  122. // Code - is the facility's status code
  123. //
  124. //
  125. // Define the facility codes
  126. //
  127. #define FACILITY_XTLIB 0x224
  128. #define FACILITY_SYSTEM 0x1
  129. #define FACILITY_STUBS 0x3
  130. #define FACILITY_RUNTIME 0x2
  131. #define FACILITY_IO_ERROR_CODE 0x4
  132. //
  133. // Define the severity codes
  134. //
  135. #define STATUS_SEVERITY_WARNING 0x2
  136. #define STATUS_SEVERITY_SUCCESS 0x0
  137. #define STATUS_SEVERITY_INFORMATIONAL 0x1
  138. #define STATUS_SEVERITY_ERROR 0x3
  139. //
  140. // MessageId: XTLIB_E_UNKNOWN_ERROR
  141. //
  142. // MessageText:
  143. //
  144. // Unknown Error.
  145. //
  146. #define XTLIB_E_UNKNOWN_ERROR ((DWORD)0xC2240000L)
  147. //
  148. // MessageId: XTLIB_E_NOT_INITIALIZED
  149. //
  150. // MessageText:
  151. //
  152. // Object %1 isn't initialized.
  153. //
  154. #define XTLIB_E_NOT_INITIALIZED ((DWORD)0xC2240001L)
  155. //
  156. // MessageId: XTLIB_E_INVALID_ENUM_VALUE
  157. //
  158. // MessageText:
  159. //
  160. // Value is an invalid value for enumtype : %1.
  161. //
  162. #define XTLIB_E_INVALID_ENUM_VALUE ((DWORD)0xC2240002L)
  163. //
  164. // MessageId: XTLIB_E_INVALID_POINTER
  165. //
  166. // MessageText:
  167. //
  168. // Invalid inputpointer(s).
  169. //
  170. #define XTLIB_E_INVALID_POINTER ((DWORD)0xC2240003L)
  171. //
  172. // MessageId: XTLIB_E_INVALID_VALUE_TYPE
  173. //
  174. // MessageText:
  175. //
  176. // the invalid valuetype.
  177. //
  178. #define XTLIB_E_INVALID_VALUE_TYPE ((DWORD)0xC2240004L)
  179. //
  180. // MessageId: XTLIB_E_INVALID_VALUE
  181. //
  182. // MessageText:
  183. //
  184. // invalid value %1
  185. //
  186. #define XTLIB_E_INVALID_VALUE ((DWORD)0xC2240005L)
  187. //
  188. // MessageId: XTLIB_E_INVALID_RANGE_VALUE
  189. //
  190. // MessageText:
  191. //
  192. // value %1 out of range.
  193. //
  194. #define XTLIB_E_INVALID_RANGE_VALUE ((DWORD)0xC2240006L)
  195. //
  196. // MessageId: XTLIB_E_CONNECTION_ERROR
  197. //
  198. // MessageText:
  199. //
  200. // Can't connect to microscope.
  201. //
  202. #define XTLIB_E_CONNECTION_ERROR ((DWORD)0xC2240007L)
  203. //
  204. // MessageId: XTLIB_E_INSTRUMENT_ERROR
  205. //
  206. // MessageText:
  207. //
  208. // Error on instrument level : %1.
  209. //
  210. #define XTLIB_E_INSTRUMENT_ERROR ((DWORD)0xC2240008L)
  211. //
  212. // MessageId: XTLIB_E_ITEM_NOT_FOUND
  213. //
  214. // MessageText:
  215. //
  216. // Item not found in collection.
  217. //
  218. #define XTLIB_E_ITEM_NOT_FOUND ((DWORD)0xC2240009L)
  219. //
  220. // MessageId: XTLIB_E_LOWLEVEL_OBJECT_NOT_INITIALIZED
  221. //
  222. // MessageText:
  223. //
  224. // Low level object : %1 not initialized.
  225. //
  226. #define XTLIB_E_LOWLEVEL_OBJECT_NOT_INITIALIZED ((DWORD)0xC224000AL)
  227. //
  228. // MessageId: XTLIB_E_INVALID_FILENAME
  229. //
  230. // MessageText:
  231. //
  232. // Invalid filename.
  233. //
  234. #define XTLIB_E_INVALID_FILENAME ((DWORD)0xC224000BL)
  235. //
  236. // MessageId: XTLIB_E_INVALID_CHANNELSTATE
  237. //
  238. // MessageText:
  239. //
  240. // Invalid channelstate for this action.
  241. //
  242. #define XTLIB_E_INVALID_CHANNELSTATE ((DWORD)0xC224000CL)