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.

200 lines
3.9 KiB

  1. /*++
  2. Copyright (c) 1999 Microsoft Corporation
  3. Module Name:
  4. exclist.h
  5. Abstract:
  6. Set of APIs to manage exclusion lists of objects of various well-known types.
  7. Author:
  8. Ovidiu Temereanca (ovidiut) 23-Nov-1999
  9. Revision History:
  10. <alias> <date> <comments>
  11. --*/
  12. //
  13. // Macro expansion list
  14. //
  15. #define EXCLUSIONLIST_TYPES \
  16. DEFMAC(ELT_UNUSED, "Unused") \
  17. DEFMAC(ELT_REGISTRY, "Registry") \
  18. DEFMAC(ELT_FILE, "File") \
  19. DEFMAC(ELT_EXTRA1, "Extra1") \
  20. DEFMAC(ELT_EXTRA2, "Extra2") \
  21. DEFMAC(ELT_EXTRA3, "Extra3") \
  22. DEFMAC(ELT_EXTRA4, "Extra4") \
  23. DEFMAC(ELT_EXTRA5, "Extra5") \
  24. DEFMAC(ELT_EXTRA6, "Extra6") \
  25. DEFMAC(ELT_EXTRA7, "Extra7") \
  26. DEFMAC(ELT_EXTRA8, "Extra8") \
  27. // this needs work in order to work with extensible types
  28. //
  29. // Types
  30. //
  31. #define DEFMAC(TypeId,TypeName) TypeId,
  32. //
  33. // these should map 1:1 with MIG_*_TYPE in ism.h for ease of use
  34. //
  35. typedef enum {
  36. EXCLUSIONLIST_TYPES /* , */
  37. ELT_LAST
  38. };
  39. #undef DEFMAC
  40. //
  41. // API
  42. //
  43. BOOL
  44. ElInitialize (
  45. VOID
  46. );
  47. VOID
  48. ElTerminateA (
  49. VOID
  50. );
  51. VOID
  52. ElTerminateW (
  53. VOID
  54. );
  55. DWORD
  56. ElGetTypeId (
  57. IN PCSTR TypeName
  58. );
  59. PCSTR
  60. ElGetTypeName (
  61. IN DWORD TypeId
  62. );
  63. BOOL
  64. ElAddA (
  65. IN DWORD ObjectType,
  66. IN PCSTR ObjectName
  67. );
  68. BOOL
  69. ElAddW (
  70. IN DWORD ObjectType,
  71. IN PCWSTR ObjectName
  72. );
  73. VOID
  74. ElRemoveAllA (
  75. VOID
  76. );
  77. VOID
  78. ElRemoveAllW (
  79. VOID
  80. );
  81. BOOL
  82. ElIsExcludedA (
  83. IN DWORD ObjectType,
  84. IN PCSTR Object
  85. );
  86. BOOL
  87. ElIsExcludedW (
  88. IN DWORD ObjectType,
  89. IN PCWSTR Object
  90. );
  91. BOOL
  92. ElIsExcluded2A (
  93. IN DWORD ObjectType,
  94. IN PCSTR Node, OPTIONAL
  95. IN PCSTR Leaf OPTIONAL
  96. );
  97. BOOL
  98. ElIsExcluded2W (
  99. IN DWORD ObjectType,
  100. IN PCWSTR Node, OPTIONAL
  101. IN PCWSTR Leaf OPTIONAL
  102. );
  103. BOOL
  104. ElIsTreeExcludedA (
  105. IN DWORD ObjectType,
  106. IN PCSTR TreePattern
  107. );
  108. BOOL
  109. ElIsTreeExcludedW (
  110. IN DWORD ObjectType,
  111. IN PCWSTR TreePattern
  112. );
  113. BOOL
  114. ElIsTreeExcluded2A (
  115. IN DWORD ObjectType,
  116. IN PCSTR Root,
  117. IN PCSTR LeafPattern OPTIONAL
  118. );
  119. BOOL
  120. ElIsTreeExcluded2W (
  121. IN DWORD ObjectType,
  122. IN PCWSTR Root,
  123. IN PCWSTR Leaf OPTIONAL
  124. );
  125. BOOL
  126. ElIsObsPatternExcludedA (
  127. IN DWORD ObjectType,
  128. IN POBSPARSEDPATTERNA Pattern
  129. );
  130. BOOL
  131. ElIsObsPatternExcludedW (
  132. IN DWORD ObjectType,
  133. IN POBSPARSEDPATTERNW Pattern
  134. );
  135. //
  136. // Macros
  137. //
  138. #ifdef UNICODE
  139. #define ElAdd ElAddW
  140. #define ElTerminate ElTerminateW
  141. #define ElRemoveAll ElRemoveAllW
  142. #define ElIsExcluded ElIsExcludedW
  143. #define ElIsExcluded2 ElIsExcluded2W
  144. #define ElIsTreeExcluded ElIsTreeExcludedW
  145. #define ElIsTreeExcluded2 ElIsTreeExcluded2W
  146. #define ElIsObsPatternExcluded ElIsObsPatternExcludedW
  147. #else
  148. #define ElAdd ElAddA
  149. #define ElTerminate ElTerminateA
  150. #define ElRemoveAll ElRemoveAllA
  151. #define ElIsExcluded ElIsExcludedA
  152. #define ElIsExcluded2 ElIsExcluded2A
  153. #define ElIsTreeExcluded ElIsTreeExcludedA
  154. #define ElIsTreeExcluded2 ElIsTreeExcluded2A
  155. #define ElIsObsPatternExcluded ElIsObsPatternExcludedA
  156. #endif