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.

399 lines
12 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1996 - 1999
  6. //
  7. // File: xom.h
  8. //
  9. //--------------------------------------------------------------------------
  10. /* <BANNER> */
  11. #include <wtypes.h> // Including LARGE_INTEGERS [rajnath]
  12. /*
  13. ** Header file for the X/OPEN Object Management (XOM) Interface and Package.
  14. */
  15. #ifndef XOM_HEADER
  16. #define XOM_HEADER
  17. /* insure that all pointers are _far and that all interface APIs follow */
  18. /* the PASCAL calling convention for 8088 to 80286 machines, and stdcall */
  19. /* convention on 32-bit platforms. */
  20. #if defined(M_I8086) || defined(M_I286)
  21. # ifndef FAR
  22. # define FAR _far
  23. # endif
  24. # ifndef NEAR
  25. # define NEAR _near
  26. # endif
  27. # ifndef XOMAPI
  28. # if defined(M_I286)
  29. # define XOMAPI _far _pascal _loadds
  30. # else
  31. # define XOMAPI _far _pascal
  32. # endif
  33. # endif
  34. #else
  35. # ifdef FAR
  36. # undef FAR
  37. # endif
  38. # define FAR
  39. # ifdef NEAR
  40. # undef NEAR
  41. # endif
  42. # define NEAR
  43. #endif
  44. #if defined(_M_IX86) && (_M_IX86 >= 300)
  45. # define XOMAPI __stdcall
  46. #endif
  47. #if defined(_M_IA64)
  48. # define XOMAPI __stdcall
  49. #endif
  50. #if defined(_M_AMD64)
  51. # define XOMAPI
  52. #endif
  53. #pragma pack(1)
  54. #if !defined(XOMAPI)
  55. # error -- TARGET MACHINE TYPE NOT SUPPORTED --
  56. #endif
  57. /* $Workfile: XOM.H $ $Revision: 1.1 $ */
  58. /* BEGIN SERVICE INTERFACE */
  59. /* INTERMEDIATE DATA TYPES */
  60. typedef short OM_sint;
  61. typedef short OM_sint16;
  62. typedef long int OM_sint32;
  63. typedef short unsigned OM_uint;
  64. typedef short unsigned OM_uint16;
  65. typedef long unsigned OM_uint32;
  66. typedef LARGE_INTEGER OM_sint64;
  67. /* PRIMARY DATA TYPES */
  68. /* Boolean */
  69. typedef OM_uint32 OM_boolean;
  70. /* Element Position */
  71. typedef OM_uint32 OM_string_length;
  72. /* Enumeration */
  73. typedef OM_sint32 OM_enumeration;
  74. /* Exclusions */
  75. typedef OM_uint OM_exclusions;
  76. /* Integer */
  77. typedef OM_sint32 OM_integer;
  78. /* Large Integer */
  79. typedef OM_sint64 OM_i8;
  80. /* DWORD_PTR */
  81. typedef DWORD_PTR OM_dword_ptr;
  82. /* Modification */
  83. typedef OM_uint OM_modification;
  84. /* Object */
  85. typedef struct OM_descriptor_struct FAR *OM_object;
  86. /* String */
  87. #ifndef OM_STRING_DEFINED
  88. #define OM_STRING_DEFINED
  89. typedef struct {
  90. OM_string_length length;
  91. void FAR *elements;
  92. } OM_string;
  93. #endif
  94. #define OM_STRING(string) \
  95. { (OM_string_length)(sizeof(string)-1), (string) }
  96. /* Workspace */
  97. typedef void FAR *OM_workspace;
  98. /* SECONDARY DATA TYPES */
  99. /* Object Identifier */
  100. typedef OM_string OM_object_identifier;
  101. /* Private Object */
  102. typedef OM_object OM_private_object;
  103. /* Public Object */
  104. typedef OM_object OM_public_object;
  105. /* Return Code */
  106. typedef OM_uint OM_return_code;
  107. /* Syntax */
  108. typedef OM_uint16 OM_syntax;
  109. /* Type */
  110. typedef OM_uint16 OM_type;
  111. /* Type List */
  112. typedef OM_type FAR *OM_type_list;
  113. /* Value */
  114. typedef struct {
  115. OM_uint32 padding;
  116. OM_object object;
  117. } OM_padded_object;
  118. typedef union OM_value_union {
  119. OM_string string;
  120. OM_boolean boolean;
  121. OM_enumeration enumeration;
  122. OM_integer integer;
  123. OM_padded_object object;
  124. OM_i8 i8;
  125. OM_dword_ptr dword_ptr;
  126. } OM_value;
  127. /* Value Length */
  128. typedef OM_uint32 OM_value_length;
  129. /* Value Position */
  130. typedef OM_uint32 OM_value_position;
  131. /* TERTIARY DATA TYPES */
  132. /* Descriptor */
  133. #include <pshpack4.h>
  134. typedef struct OM_descriptor_struct {
  135. OM_type type;
  136. OM_syntax syntax;
  137. union OM_value_union value;
  138. } OM_descriptor;
  139. #include <poppack.h>
  140. /* SYMBOLIC CONSTANTS */
  141. /* Boolean */
  142. #define OM_FALSE ( (OM_boolean) 0 )
  143. #define OM_TRUE ( (OM_boolean) 1 )
  144. /* Element Position */
  145. #define OM_LENGTH_UNSPECIFIED ( (OM_string_length) 0xFFFFFFFF )
  146. /* Exclusions */
  147. #define OM_NO_EXCLUSIONS ( (OM_exclusions) 0 )
  148. #define OM_EXCLUDE_ALL_BUT_THESE_TYPES ( (OM_exclusions) 1 )
  149. #define OM_EXCLUDE_ALL_BUT_THESE_VALUES ( (OM_exclusions) 2 )
  150. #define OM_EXCLUDE_MULTIPLES ( (OM_exclusions) 4 )
  151. #define OM_EXCLUDE_SUBOBJECTS ( (OM_exclusions) 8 )
  152. #define OM_EXCLUDE_VALUES ( (OM_exclusions) 16 )
  153. #define OM_EXCLUDE_DESCRIPTORS ( (OM_exclusions) 32 )
  154. /* Modification */
  155. #define OM_INSERT_AT_BEGINNING ( (OM_modification) 1 )
  156. #define OM_INSERT_AT_CERTAIN_POINT ( (OM_modification) 2 )
  157. #define OM_INSERT_AT_END ( (OM_modification) 3 )
  158. #define OM_REPLACE_ALL ( (OM_modification) 4 )
  159. #define OM_REPLACE_CERTAIN_VALUES ( (OM_modification) 5 )
  160. /* Object Identifiers */
  161. /* NOTE: These macros rely on the ## token-pasting operator of ANSI C.
  162. * On many pre-ANSI compilers the same effect can be obtained by
  163. * replacing ## with /**/
  164. /* Private macro to calculate length of an object identifier
  165. */
  166. #define OMP_LENGTH(oid_string) (sizeof(OMP_O_##oid_string)-1)
  167. /* Macro to initialise the syntax and value of an object identifier
  168. */
  169. #define OM_OID_DESC(type, oid_name) \
  170. { (type), OM_S_OBJECT_IDENTIFIER_STRING, \
  171. { { OMP_LENGTH(oid_name) , OMP_D_##oid_name } } }
  172. /* Macro to mark the end of a public object
  173. */
  174. #define OM_NULL_DESCRIPTOR \
  175. { OM_NO_MORE_TYPES, OM_S_NO_MORE_SYNTAXES, \
  176. { 0, OM_ELEMENTS_UNSPECIFIED } }
  177. /* Macro to make class constants available within a compilation unit
  178. */
  179. #define OM_IMPORT(class_name) \
  180. extern char FAR OMP_D_##class_name[] ; \
  181. extern OM_string FAR class_name;
  182. /* Macro to allocate memory for class constants within a compilation unit
  183. */
  184. #define OM_EXPORT(class_name) \
  185. char FAR OMP_D_##class_name[] = OMP_O_##class_name ; \
  186. OM_string FAR class_name = \
  187. { OMP_LENGTH(class_name), OMP_D_##class_name } ;
  188. /* Constant for the OM package
  189. */
  190. #define OMP_O_OM_OM "\126\006\001\002\004"
  191. /* Constant for the Encoding class
  192. */
  193. #define OMP_O_OM_C_ENCODING "\126\006\001\002\004\001"
  194. /* Constant for the External class
  195. */
  196. #define OMP_O_OM_C_EXTERNAL "\126\006\001\002\004\002"
  197. /* Constant for the Object class
  198. */
  199. #define OMP_O_OM_C_OBJECT "\126\006\001\002\004\003"
  200. /* Constant for the BER Object Identifier
  201. */
  202. #define OMP_O_OM_BER "\121\001"
  203. /* Constant for the Canonical-BER Object Identifier
  204. */
  205. #define OMP_O_OM_CANONICAL_BER "\126\006\001\002\005"
  206. /* Return Code */
  207. #define OM_SUCCESS ( (OM_return_code) 0 )
  208. #define OM_ENCODING_INVALID ( (OM_return_code) 1 )
  209. #define OM_FUNCTION_DECLINED ( (OM_return_code) 2 )
  210. #define OM_FUNCTION_INTERRUPTED ( (OM_return_code) 3 )
  211. #define OM_MEMORY_INSUFFICIENT ( (OM_return_code) 4 )
  212. #define OM_NETWORK_ERROR ( (OM_return_code) 5 )
  213. #define OM_NO_SUCH_CLASS ( (OM_return_code) 6 )
  214. #define OM_NO_SUCH_EXCLUSION ( (OM_return_code) 7 )
  215. #define OM_NO_SUCH_MODIFICATION ( (OM_return_code) 8 )
  216. #define OM_NO_SUCH_OBJECT ( (OM_return_code) 9 )
  217. #define OM_NO_SUCH_RULES ( (OM_return_code) 10 )
  218. #define OM_NO_SUCH_SYNTAX ( (OM_return_code) 11 )
  219. #define OM_NO_SUCH_TYPE ( (OM_return_code) 12 )
  220. #define OM_NO_SUCH_WORKSPACE ( (OM_return_code) 13 )
  221. #define OM_NOT_AN_ENCODING ( (OM_return_code) 14 )
  222. #define OM_NOT_CONCRETE ( (OM_return_code) 15 )
  223. #define OM_NOT_PRESENT ( (OM_return_code) 16 )
  224. #define OM_NOT_PRIVATE ( (OM_return_code) 17 )
  225. #define OM_NOT_THE_SERVICES ( (OM_return_code) 18 )
  226. #define OM_PERMANENT_ERROR ( (OM_return_code) 19 )
  227. #define OM_POINTER_INVALID ( (OM_return_code) 20 )
  228. #define OM_SYSTEM_ERROR ( (OM_return_code) 21 )
  229. #define OM_TEMPORARY_ERROR ( (OM_return_code) 22 )
  230. #define OM_TOO_MANY_VALUES ( (OM_return_code) 23 )
  231. #define OM_VALUES_NOT_ADJACENT ( (OM_return_code) 24 )
  232. #define OM_WRONG_VALUE_LENGTH ( (OM_return_code) 25 )
  233. #define OM_WRONG_VALUE_MAKEUP ( (OM_return_code) 26 )
  234. #define OM_WRONG_VALUE_NUMBER ( (OM_return_code) 27 )
  235. #define OM_WRONG_VALUE_POSITION ( (OM_return_code) 28 )
  236. #define OM_WRONG_VALUE_SYNTAX ( (OM_return_code) 29 )
  237. #define OM_WRONG_VALUE_TYPE ( (OM_return_code) 30 )
  238. /* String (Elements component) */
  239. #define OM_ELEMENTS_UNSPECIFIED ( (void *) 0 )
  240. /* Syntax */
  241. #define OM_S_NO_MORE_SYNTAXES ( (OM_syntax) 0 )
  242. #define OM_S_BIT_STRING ( (OM_syntax) 3 )
  243. #define OM_S_BOOLEAN ( (OM_syntax) 1 )
  244. #define OM_S_ENCODING_STRING ( (OM_syntax) 8 )
  245. #define OM_S_ENUMERATION ( (OM_syntax) 10 )
  246. #define OM_S_GENERAL_STRING ( (OM_syntax) 27 )
  247. #define OM_S_GENERALISED_TIME_STRING ( (OM_syntax) 24 )
  248. #define OM_S_GRAPHIC_STRING ( (OM_syntax) 25 )
  249. #define OM_S_IA5_STRING ( (OM_syntax) 22 )
  250. #define OM_S_INTEGER ( (OM_syntax) 2 )
  251. #define OM_S_NULL ( (OM_syntax) 5 )
  252. #define OM_S_NUMERIC_STRING ( (OM_syntax) 18 )
  253. #define OM_S_OBJECT ( (OM_syntax) 127 )
  254. #define OM_S_OBJECT_DESCRIPTOR_STRING ( (OM_syntax) 7 )
  255. #define OM_S_OBJECT_IDENTIFIER_STRING ( (OM_syntax) 6 )
  256. #define OM_S_OCTET_STRING ( (OM_syntax) 4 )
  257. #define OM_S_PRINTABLE_STRING ( (OM_syntax) 19 )
  258. #define OM_S_TELETEX_STRING ( (OM_syntax) 20 )
  259. #define OM_S_UTC_TIME_STRING ( (OM_syntax) 23 )
  260. #define OM_S_VIDEOTEX_STRING ( (OM_syntax) 21 )
  261. #define OM_S_VISIBLE_STRING ( (OM_syntax) 26 )
  262. #define OM_S_UNICODE_STRING ( (OM_syntax) 64 )
  263. #define OM_S_I8 ( (OM_syntax) 65 )
  264. #define OM_S_OBJECT_SECURITY_DESCRIPTOR ( (OM_syntax) 66 )
  265. #define OM_S_LONG_STRING ((OM_syntax) 0x8000)
  266. #define OM_S_NO_VALUE ((OM_syntax) 0x4000)
  267. #define OM_S_LOCAL_STRING ((OM_syntax) 0x2000)
  268. #define OM_S_SERVICE_GENERATED ((OM_syntax) 0x1000)
  269. #define OM_S_PRIVATE ((OM_syntax) 0x0800)
  270. #define OM_S_SYNTAX ((OM_syntax) 0x03FF)
  271. /* Type */
  272. #define OM_NO_MORE_TYPES ( (OM_type) 0 )
  273. #define OM_ARBITRARY_ENCODING ( (OM_type) 1 )
  274. #define OM_ASN1_ENCODING ( (OM_type) 2 )
  275. #define OM_CLASS ( (OM_type) 3 )
  276. #define OM_DATA_VALUE_DESCRIPTOR ( (OM_type) 4 )
  277. #define OM_DIRECT_REFERENCE ( (OM_type) 5 )
  278. #define OM_INDIRECT_REFERENCE ( (OM_type) 6 )
  279. #define OM_OBJECT_CLASS ( (OM_type) 7 )
  280. #define OM_OBJECT_ENCODING ( (OM_type) 8 )
  281. #define OM_OCTET_ALIGNED_ENCODING ( (OM_type) 9 )
  282. #define OM_PRIVATE_OBJECT ( (OM_type) 10 )
  283. #define OM_RULES ( (OM_type) 11 )
  284. /* Value Position */
  285. #define OM_ALL_VALUES ( (OM_value_position) 0xFFFFFFFF)
  286. /* WORKSPACE INTERFACE */
  287. #include <xomi.h>
  288. #pragma pack()
  289. /* END SERVICE INTERFACE */
  290. #endif /* XOM_HEADER */