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.

552 lines
19 KiB

  1. #if !defined(_FUSION_ID_IDP_H_INCLUDED_)
  2. #define _FUSION_ID_IDP_H_INCLUDED_
  3. /*++
  4. Copyright (c) 1989 Microsoft Corporation
  5. Module Name:
  6. idp.h
  7. Abstract:
  8. private definitions for assembly identity
  9. Author:
  10. Michael Grier (MGrier) 7/27/2000
  11. Revision History:
  12. --*/
  13. #pragma once
  14. #include <sxstypes.h>
  15. #include <sxsapi.h>
  16. //
  17. // Power of two to which to round the number of allocated attribute
  18. // pointers.
  19. //
  20. #define ROUNDING_FACTOR_BITS (3)
  21. #define WILDCARD_CHAR '*'
  22. //
  23. // Note! Do not change this algorithm lightly. Encoded identities stored in the
  24. // filesystem contain hashes using it. Actually, just do not change it.
  25. //
  26. #define HASH_ALGORITHM HASH_STRING_ALGORITHM_X65599
  27. typedef struct _ASSEMBLY_IDENTITY_NAMESPACE {
  28. ULONG Hash;
  29. ULONG Flags;
  30. SIZE_T NamespaceCch;
  31. const WCHAR *Namespace;
  32. } ASSEMBLY_IDENTITY_NAMESPACE, *PASSEMBLY_IDENTITY_NAMESPACE;
  33. typedef const ASSEMBLY_IDENTITY_NAMESPACE *PCASSEMBLY_IDENTITY_NAMESPACE;
  34. //
  35. // Internal-use ASSEMBLY_IDENTITY_ATTRIBUTE struct that
  36. // also contains the hash of the attribute definition.
  37. //
  38. typedef struct _INTERNAL_ASSEMBLY_IDENTITY_ATTRIBUTE {
  39. // NOTE!!! It is very important that the Attribute member appear first in this struct;
  40. // there are several places in the code that make this assumption. If it is not true,
  41. // the code will break!
  42. // Note also that the Attribute's namespace string is actually allocated in common
  43. // for all attributes with the same namespace.
  44. ASSEMBLY_IDENTITY_ATTRIBUTE Attribute;
  45. PCASSEMBLY_IDENTITY_NAMESPACE Namespace;
  46. ULONG NamespaceAndNameHash;
  47. ULONG WholeAttributeHash;
  48. } INTERNAL_ASSEMBLY_IDENTITY_ATTRIBUTE, *PINTERNAL_ASSEMBLY_IDENTITY_ATTRIBUTE;
  49. C_ASSERT(FIELD_OFFSET(INTERNAL_ASSEMBLY_IDENTITY_ATTRIBUTE, Attribute) == 0);
  50. typedef const INTERNAL_ASSEMBLY_IDENTITY_ATTRIBUTE *PCINTERNAL_ASSEMBLY_IDENTITY_ATTRIBUTE;
  51. #define ASSEMBLY_IDENTITY_INTERNAL_FLAG_ATTRIBUTE_POINTERS_IN_SEPARATE_ALLOCATION (0x00000001)
  52. #define ASSEMBLY_IDENTITY_INTERNAL_FLAG_SINGLE_ALLOCATION_FOR_EVERYTHING (0x00000002)
  53. #define ASSEMBLY_IDENTITY_INTERNAL_FLAG_NAMESPACE_POINTERS_IN_SEPARATE_ALLOCATION (0x00000004)
  54. //
  55. // Revelation of the ASSEMBLY_IDENTITY struct:
  56. //
  57. typedef struct _ASSEMBLY_IDENTITY {
  58. ULONG Flags;
  59. ULONG InternalFlags;
  60. ULONG Type;
  61. ULONG Hash;
  62. ULONG AttributeCount;
  63. ULONG AttributeArraySize; // preallocated a little larger so that we don't have to keep growing
  64. ULONG NamespaceCount;
  65. ULONG NamespaceArraySize;
  66. BOOLEAN HashDirty;
  67. PCINTERNAL_ASSEMBLY_IDENTITY_ATTRIBUTE *AttributePointerArray;
  68. PCASSEMBLY_IDENTITY_NAMESPACE *NamespacePointerArray;
  69. } ASSEMBLY_IDENTITY;
  70. //
  71. // Header for encoded/serialized assembly identities:
  72. //
  73. #define ENCODED_ASSEMBLY_IDENTITY_HEADER_MAGIC ((ULONG) 'dIAE')
  74. //
  75. // Encoded assembly identity layout:
  76. //
  77. // ENCODED_ASSEMBLY_IDENTITY_HEADER
  78. // <AttributeCount hashes of the attributes, sorted by the hash value>
  79. // <NamespaceCount ENCODED_ASSEMBLY_IDENTITY_NAMESPACE_HEADER headers, each
  80. // followed by the unicode namespace value>
  81. // <AttributeCount ENCODED_ASSEMBLY_IDENTITY_ATTRIBUTE_HEADER headers, each
  82. // followed by the unicode attribute name and value>
  83. //
  84. //
  85. // e.g.
  86. //
  87. // <begin ENCODED_ASSEMBLY_IDENTITY_HEADER>
  88. // 00000000: 00000038 HeaderSize == sizeof(ENCODED_ASSEMBLY_IDENTITY_HEADER)
  89. // 00000004: 'EAId' Magic (ENCODED_ASSEMBLY_IDENTITY_HEADER_MAGIC)
  90. // 00000008: 0000014C TotalSize
  91. // 0000000C: 00000000 Flags
  92. // 00000010: 00000001 Type (1 = ASSEMBLY_IDENTITY_TYPE_DEFINITION)
  93. // 00000014: 00000000 EncodingFlags
  94. // 00000018: 00000001 HashAlgorithm (1 = HASH_STRING_ALGORITHM_X65599)
  95. // 0000001C: ???????? Logical hash value of entire identity based on hash algorithm
  96. // (algorithm described in more detail below...)
  97. // 00000020: 00000003 AttributeCount
  98. // 00000024: 00000002 NamespaceCount
  99. // 00000028: 00000000 ReservedMustBeZero1
  100. // 0000002C: 00000000 ReservedMustBeZero2
  101. // 00000030: 00000000 00000000 ReservedMustBeZero3
  102. // 00000038: 00000000 00000000 ReservedMustBeZero4
  103. // <end ENCODED_ASSEMBLY_IDENTITY_HEADER>
  104. // <begin sorted attribute hash list>
  105. // 00000040: xxxxxxxx hash of attribute #1
  106. // 00000044: yyyyyyyy hash of attribute #0 - note that yyyyyyyy >= xxxxxxxx
  107. // 00000048: zzzzzzzz hash of attribute #2 - note that zzzzzzzz >= yyyyyyyy
  108. // <end sorted attribute hash list>
  109. // <begin namespace length list>
  110. // 0000004C: 00000015 length (in Unicode chars) of namespace #1 - "http://www.amazon.com" - 21 chars = 0x00000015
  111. // 00000050: 00000018 length (in Unicode chars) of namespace #2 - "http://www.microsoft.com" - 24 chars = 0x00000018
  112. // <end namespace length list>
  113. // <begin attribute headers>
  114. // <begin ENCODED_ASSEMBLY_IDENTITY_ATTRIBUTE_HEADER>
  115. // 00000054: 00000001 NamespaceIndex: 1 (http://www.amazon.com)
  116. // 00000058: 00000004 Name length ("name" - 4 chars = 0x00000004)
  117. // 0000005C: 00000006 Value length ("foobar" - 6 chars = 0x00000006)
  118. // <end ENCODED_ASSEMBLY_IDENTITY_ATTRIBUTE_HEADER>
  119. // <begin ENCODED_ASSEMBLY_IDENTITY_ATTRIBUTE_HEADER>
  120. // 00000060: 00000002 NamespaceIndex: 2 (http://www.microsoft.com)
  121. // 00000064: 00000004 Name length ("guid" - 4 chars = 0x00000004)
  122. // 00000068: 00000026 Value length ("{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}" - 38 chars = 0x00000026)
  123. // <end ENCODED_ASSEMBLY_IDENTITY_ATTRIBUTE_HEADER>
  124. // <begin ENCODED_ASSEMBLY_IDENTITY_ATTRIBUTE_HEADER>
  125. // 0000006C: 00000002 NamespaceIndex: 2 (http://www.microsoft.com)
  126. // 00000070: 00000004 Name length ("type" - 4 chars = 0x00000004)
  127. // 00000074: 00000005 Value length ("win32" - 5 chars = 0x00000005)
  128. // <end ENCODED_ASSEMBLY_IDENTITY_ATTRIBUTE_HEADER>
  129. // <end attribute headers>
  130. // <begin namespace strings>
  131. // 00000078: "http://www.amazon.com"
  132. // 000000A2: "http://www.microsoft.com"
  133. // <end namespace strings>
  134. // <begin attribute values - names and values for each attribute in series>
  135. // 000000D2: "name"
  136. // 000000DA: "foobar"
  137. // 000000E6: "guid"
  138. // 000000EE: "{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}"
  139. // 0000013A: "type"
  140. // 00000142: "win32"
  141. // <end attribute values>
  142. // 0000014C:
  143. //
  144. // Computing the whole identity hash:
  145. //
  146. // The hash of the entire encoded identity is not the hash of the binary form, but
  147. // rather is a combination of the hashes for the various components.
  148. //
  149. // For any Unicode character string, its hash is computed according to HashAlgorithm.
  150. // Currently this must be HASH_STRING_ALGORITHM_X65599 which is a multiply-and-
  151. // accumulate algorithm, implemented essentially as follows:
  152. //
  153. // HashValue = 0;
  154. // for (i=0; i<Chars; i++)
  155. // HashValue = (HashValue * 65599) + OptionalToUpper(String[i]);
  156. //
  157. // Note that the characters are converted to upper case. This is somewhat in
  158. // conflict with the Unicode recommendation to convert to lower case for case
  159. // insensitive operations, but it is what the rest of the Windows NT system
  160. // does, so consistency matters more than doing the "right thing".
  161. //
  162. // Note also that no trailing null characters are included in the hash. This
  163. // is significant because of the fact that applying the loop to another character
  164. // even though its value is zero will significantly change the hash value.
  165. //
  166. // Namespaces and attribute names are case sensitive, derived from the fact
  167. // that they appear in case sensitive contexts in the real world. This is
  168. // unfortunate, but simpler in many ways.
  169. //
  170. // Assembly identity attributes are composed of a triple of:
  171. // - Namespace URI (e.g. http://www.microsoft.com/schemas/side-by-side)
  172. // - Name (e.g. "publicKey")
  173. // - Value (case insensitive Unicode string)
  174. //
  175. // The hash of an attribute is computed by computing the hash of the three
  176. // strings, and then combining them as:
  177. //
  178. // AttributeHashValue = (((NamespaceHash * 65599) + NameHash) * 65599) + ValueHash
  179. //
  180. // Now, sort the attributes based first on namespace, then on name then on
  181. // value (case sensitive, case sensitive and case insensitive respectively),
  182. // and combine their hashes as follows:
  183. //
  184. // IdentityHash = 0;
  185. // for (i=0; i<AttributeCount; i++)
  186. // IdentityHash = (IdentityHash * 65599) + AttributeHashes[i];
  187. //
  188. // IdentityHash is the value stored in the encoded header.
  189. //
  190. // The attribute hash array stored in the encoded data is the attribute
  191. // hashes as described above. The interesting thing is that they are stored
  192. // in order of ascending hash value, not in the canonical ordering for
  193. // attributes.
  194. //
  195. // This is because a common scenario is to find an identity which has a
  196. // superset of a given identity. While the actual attributes have to
  197. // be consulted to verify that the candidate is a true subset, non-
  198. // matches can be very quickly found by sorting both lists of hash
  199. // values and first looping over the smaller reference list, then
  200. // in a single pass walking the larger definition list. Attributes present
  201. // in one but not in the other will be immediately noticable due to
  202. // the missing hashes.
  203. //
  204. // As always with hashes, just because an encoded identity contains a
  205. // superset of the hash values in your candidate assembly reference,
  206. // it does not mean that the actual values appear and you must perform
  207. // real character string comparisons to verify containment.
  208. //
  209. #include <pshpack4.h>
  210. typedef struct _ENCODED_ASSEMBLY_IDENTITY_HEADER {
  211. ULONG HeaderSize; // bytes just in the header
  212. ULONG Magic;
  213. ULONG TotalSize; // bytes for the whole encoded thing
  214. ULONG Flags; // as defined for assembly identity flags
  215. ULONG Type; // type of identity - def, ref or wildcard
  216. ULONG EncodingFlags; // flags describing the encoding itself
  217. ULONG HashAlgorithm; // Algorithm ID for the hashes stored in the identity
  218. ULONG Hash; // Hash value of the entire identity
  219. ULONG AttributeCount; // number of attributes
  220. ULONG NamespaceCount; // number of distinct namespaces
  221. ULONG ReservedMustBeZero1;
  222. ULONG ReservedMustBeZero2;
  223. ULONGLONG ReservedMustBeZero3;
  224. ULONGLONG ReservedMustBeZero4;
  225. } ENCODED_ASSEMBLY_IDENTITY_HEADER, *PENCODED_ASSEMBLY_IDENTITY_HEADER;
  226. typedef const ENCODED_ASSEMBLY_IDENTITY_HEADER *PCENCODED_ASSEMBLY_IDENTITY_HEADER;
  227. typedef struct _ENCODED_ASSEMBLY_IDENTITY_ATTRIBUTE_HEADER {
  228. ULONG NamespaceIndex; // number of the namespace for this attribute
  229. ULONG NameCch; // size in Unicode characters of the name immediately following the
  230. // namespace
  231. ULONG ValueCch; // size in Unicode characters of the value immediately following the
  232. // name.
  233. } ENCODED_ASSEMBLY_IDENTITY_ATTRIBUTE_HEADER, *PENCODED_ASSEMBLY_IDENTITY_ATTRIBUTE_HEADER;
  234. typedef const ENCODED_ASSEMBLY_IDENTITY_ATTRIBUTE_HEADER *PCENCODED_ASSEMBLY_IDENTITY_ATTRIBUTE_HEADER;
  235. #include <poppack.h>
  236. #define SXSP_VALIDATE_ASSEMBLY_IDENTITY_FLAGS_MAY_BE_NULL (0x00000001)
  237. NTSTATUS
  238. RtlSxspValidateAssemblyIdentity(
  239. IN ULONG Flags,
  240. IN PCASSEMBLY_IDENTITY AssemblyIdentity
  241. );
  242. NTSTATUS
  243. RtlSxspValidateAssemblyIdentityAttributeNamespace(
  244. IN ULONG Flags,
  245. IN const WCHAR *Namespace,
  246. IN SIZE_T NamespaceCch
  247. );
  248. NTSTATUS
  249. RtlSxspValidateAssemblyIdentityAttributeName(
  250. IN ULONG Flags,
  251. IN const WCHAR *Name,
  252. IN SIZE_T NameCch
  253. );
  254. #define SXSP_VALIDATE_ASSEMBLY_IDENTITY_ATTRIBUTE_VALUE_FLAG_WILDCARDS_PERMITTED (0x00000001)
  255. NTSTATUS
  256. RtlSxspValidateAssemblyIdentityAttributeValue(
  257. IN ULONG Flags,
  258. IN const WCHAR *Value,
  259. IN SIZE_T ValueCch
  260. );
  261. NTSTATUS
  262. RtlSxspComputeInternalAssemblyIdentityAttributeBytesRequired(
  263. IN ULONG Flags,
  264. IN const WCHAR *Name,
  265. IN SIZE_T NameCch,
  266. IN const WCHAR *Value,
  267. IN SIZE_T ValueCch,
  268. OUT SIZE_T *BytesRequiredOut
  269. );
  270. NTSTATUS
  271. RtlSxspComputeAssemblyIdentityAttributeBytesRequired(
  272. IN ULONG Flags,
  273. IN PCASSEMBLY_IDENTITY_ATTRIBUTE Source,
  274. OUT SIZE_T *BytesRequiredOut
  275. );
  276. #define SXSP_FIND_ASSEMBLY_IDENTITY_NAMESPACE_IN_ARRAY_FLAG_ADD_IF_NOT_FOUND (0x00000001)
  277. NTSTATUS
  278. RtlSxspFindAssemblyIdentityNamespaceInArray(
  279. IN ULONG Flags,
  280. IN OUT PCASSEMBLY_IDENTITY_NAMESPACE **NamespacePointerArrayPtr,
  281. IN OUT ULONG *NamespaceArraySizePtr,
  282. IN OUT ULONG *NamespaceCountPtr,
  283. IN const WCHAR *Namespace,
  284. IN SIZE_T NamespaceCch,
  285. OUT PCASSEMBLY_IDENTITY_NAMESPACE *NamespaceOut
  286. );
  287. #define SXSP_FIND_ASSEMBLY_IDENTITY_NAMESPACE_FLAG_ADD_IF_NOT_FOUND (0x00000001)
  288. NTSTATUS
  289. RtlSxspFindAssemblyIdentityNamespace(
  290. IN ULONG Flags,
  291. IN struct _ASSEMBLY_IDENTITY* AssemblyIdentity,
  292. IN const WCHAR *Namespace,
  293. IN SIZE_T NamespaceCch,
  294. OUT PCASSEMBLY_IDENTITY_NAMESPACE *NamespaceOut
  295. );
  296. NTSTATUS
  297. RtlSxspAllocateAssemblyIdentityNamespace(
  298. IN ULONG Flags,
  299. IN const WCHAR *NamespaceString,
  300. IN SIZE_T NamespaceCch,
  301. IN ULONG NamespaceHash,
  302. OUT PCASSEMBLY_IDENTITY_NAMESPACE *NamespaceOut
  303. );
  304. VOID
  305. RtlSxspDeallocateAssemblyIdentityNamespace(
  306. IN PCASSEMBLY_IDENTITY_NAMESPACE Namespace
  307. );
  308. NTSTATUS
  309. RtlSxspPopulateInternalAssemblyIdentityAttribute(
  310. IN ULONG Flags,
  311. IN PCASSEMBLY_IDENTITY_NAMESPACE Namespace,
  312. IN const WCHAR *Name,
  313. IN SIZE_T NameCch,
  314. IN const WCHAR *Value,
  315. IN SIZE_T ValueCch,
  316. OUT PINTERNAL_ASSEMBLY_IDENTITY_ATTRIBUTE Destination
  317. );
  318. NTSTATUS
  319. RtlSxspAllocateInternalAssemblyIdentityAttribute(
  320. IN ULONG Flags,
  321. IN PCASSEMBLY_IDENTITY_NAMESPACE Namespace,
  322. IN const WCHAR *Name,
  323. IN SIZE_T NameCch,
  324. IN const WCHAR *Value,
  325. IN SIZE_T ValueCch,
  326. OUT PCINTERNAL_ASSEMBLY_IDENTITY_ATTRIBUTE *Destination
  327. );
  328. VOID
  329. RtlSxspCleanUpAssemblyIdentityNamespaceIfNotReferenced(
  330. IN ULONG Flags,
  331. IN struct _ASSEMBLY_IDENTITY* AssemblyIdentity,
  332. IN PCASSEMBLY_IDENTITY_NAMESPACE Namespace
  333. );
  334. VOID
  335. RtlSxspDeallocateInternalAssemblyIdentityAttribute(
  336. PCINTERNAL_ASSEMBLY_IDENTITY_ATTRIBUTE Attribute
  337. );
  338. int
  339. __cdecl
  340. RtlSxspCompareInternalAttributesForQsort(
  341. const void *elem1,
  342. const void *elem2
  343. );
  344. int
  345. __cdecl
  346. RtlSxspCompareULONGsForQsort(
  347. const void *elem1,
  348. const void *elem2
  349. );
  350. NTSTATUS
  351. RtlSxspCompareAssemblyIdentityAttributeLists(
  352. ULONG Flags,
  353. ULONG AttributeCount,
  354. PCINTERNAL_ASSEMBLY_IDENTITY_ATTRIBUTE *List1,
  355. PCINTERNAL_ASSEMBLY_IDENTITY_ATTRIBUTE *List2,
  356. ULONG *ComparisonResultOut
  357. );
  358. NTSTATUS
  359. RtlSxspHashInternalAssemblyIdentityAttributes(
  360. ULONG Flags,
  361. ULONG Count,
  362. PCINTERNAL_ASSEMBLY_IDENTITY_ATTRIBUTE *Attributes,
  363. ULONG *HashOut
  364. );
  365. NTSTATUS
  366. RtlSxspCopyInternalAssemblyIdentityAttributeOut(
  367. ULONG Flags,
  368. PCINTERNAL_ASSEMBLY_IDENTITY_ATTRIBUTE Attribute,
  369. SIZE_T BufferSize,
  370. PASSEMBLY_IDENTITY_ATTRIBUTE DestinationBuffer,
  371. SIZE_T *BytesCopiedOrRequired
  372. );
  373. NTSTATUS
  374. RtlSxspIsInternalAssemblyIdentityAttribute(
  375. IN ULONG Flags,
  376. IN PCINTERNAL_ASSEMBLY_IDENTITY_ATTRIBUTE Attribute,
  377. IN const WCHAR *Namespace,
  378. IN SIZE_T NamespaceCch,
  379. IN const WCHAR *Name,
  380. IN SIZE_T NameCch,
  381. OUT BOOLEAN *EqualsOut
  382. );
  383. #define SXSP_COMPUTE_INTERNAL_ASSEMBLY_IDENTITY_ATTRIBUTE_ENCODED_TEXTUAL_SIZE_FLAG_VALUE_ONLY (0x00000001)
  384. #define SXSP_COMPUTE_INTERNAL_ASSEMBLY_IDENTITY_ATTRIBUTE_ENCODED_TEXTUAL_SIZE_FLAG_OMIT_QUOTES (0x00000002)
  385. NTSTATUS
  386. RtlSxspComputeInternalAssemblyIdentityAttributeEncodedTextualSize(
  387. IN ULONG Flags,
  388. IN PCINTERNAL_ASSEMBLY_IDENTITY_ATTRIBUTE Attribute,
  389. OUT SIZE_T *BytesOut
  390. );
  391. #define SXSP_LOCATE_INTERNAL_ASSEMBLY_IDENTITY_ATTRIBUTE_FLAG_MATCH_NAMESPACE (0x00000001)
  392. #define SXSP_LOCATE_INTERNAL_ASSEMBLY_IDENTITY_ATTRIBUTE_FLAG_MATCH_NAME (0x00000002)
  393. #define SXSP_LOCATE_INTERNAL_ASSEMBLY_IDENTITY_ATTRIBUTE_FLAG_MATCH_VALUE (0x00000004)
  394. #define SXSP_LOCATE_INTERNAL_ASSEMBLY_IDENTITY_ATTRIBUTE_FLAG_NOT_FOUND_RETURNS_NULL (0x00000008)
  395. NTSTATUS
  396. RtlSxspLocateInternalAssemblyIdentityAttribute(
  397. IN ULONG Flags,
  398. IN PCASSEMBLY_IDENTITY AssemblyIdentity,
  399. IN PCASSEMBLY_IDENTITY_ATTRIBUTE Attribute,
  400. OUT PCINTERNAL_ASSEMBLY_IDENTITY_ATTRIBUTE *InternalAttributeOut,
  401. OUT ULONG *LastIndexSearched OPTIONAL
  402. );
  403. NTSTATUS
  404. RtlSxspComputeQuotedStringSize(
  405. IN ULONG Flags,
  406. IN const WCHAR *StringIn,
  407. IN SIZE_T Cch,
  408. OUT SIZE_T *BytesOut
  409. );
  410. VOID
  411. RtlSxspDbgPrintInternalAssemblyIdentityAttribute(
  412. ULONG dwflags,
  413. PCINTERNAL_ASSEMBLY_IDENTITY_ATTRIBUTE Attribute
  414. );
  415. VOID
  416. RtlSxspDbgPrintInternalAssemblyIdentityAttributes(
  417. ULONG dwflags,
  418. ULONG AttributeCount,
  419. PCINTERNAL_ASSEMBLY_IDENTITY_ATTRIBUTE const *Attributes
  420. );
  421. VOID
  422. RtlSxspDbgPrintAssemblyIdentityAttribute(
  423. ULONG dwflags,
  424. PCASSEMBLY_IDENTITY_ATTRIBUTE Attribute
  425. );
  426. VOID
  427. RtlSxspDbgPrintAssemblyIdentityAttributes(
  428. ULONG dwflags,
  429. ULONG AttributeCount,
  430. PCASSEMBLY_IDENTITY_ATTRIBUTE const *Attributes
  431. );
  432. NTSTATUS
  433. RtlSxspEnsureAssemblyIdentityHashIsUpToDate(
  434. ULONG dwFlags,
  435. PCASSEMBLY_IDENTITY AssemblyIdentity
  436. );
  437. NTSTATUS
  438. RtlSxspHashUnicodeString(
  439. PCWSTR String,
  440. SIZE_T cch,
  441. PULONG HashValue,
  442. BOOLEAN fCaseInsensitive
  443. );
  444. NTSTATUS
  445. RtlSxspDbgPrintEx(
  446. ULONG dwFlags,
  447. CHAR *pcszFormatString,
  448. ...);
  449. SIZE_T
  450. RtlStringComplimentSpan(
  451. PCWSTR pcwszStart,
  452. PCWSTR pcwszEnd,
  453. PCWSTR pcwszMarkers
  454. );
  455. LONG FORCEINLINE
  456. RtlSxspCompareStrings(
  457. PCWSTR pcwsz1,
  458. SIZE_T cch1,
  459. PCWSTR pcwsz2,
  460. SIZE_T cch2,
  461. BOOLEAN fInsensitive
  462. );
  463. #endif
  464. NTSTATUS
  465. RtlSxspValidateXMLName(
  466. PCWSTR psz,
  467. SIZE_T cch,
  468. BOOLEAN *prfValid
  469. );
  470. #ifndef PARAMETER_CHECK
  471. #define PARAMETER_CHECK(q) if (!(q)) { return STATUS_INVALID_PARAMETER; }
  472. #endif