Source code of Windows XP (NT5)
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.

128 lines
4.4 KiB

  1. #if !defined(_FUSION_INC_SXSID_H_INCLUDED_)
  2. #define _FUSION_INC_SXSID_H_INCLUDED_
  3. #pragma once
  4. //adriaanc
  5. //#include <windows.h>
  6. #include <setupapi.h>
  7. #include <sxsapi.h>
  8. //#include <stdlib.h>
  9. //#include <search.h>
  10. typedef struct _SXS_ASSEMBLY_IDENTITY_ATTRIBUTE_REFERENCE
  11. {
  12. const WCHAR *Namespace;
  13. SIZE_T NamespaceCch;
  14. const WCHAR *Name;
  15. SIZE_T NameCch;
  16. } SXS_ASSEMBLY_IDENTITY_ATTRIBUTE_REFERENCE, *PSXS_ASSEMBLY_IDENTITY_ATTRIBUTE_REFERENCE;
  17. typedef const SXS_ASSEMBLY_IDENTITY_ATTRIBUTE_REFERENCE *PCSXS_ASSEMBLY_IDENTITY_ATTRIBUTE_REFERENCE;
  18. #define SXS_DEFINE_ATTRIBUTE_REFERENCE_EX(_id, _ns, _n) EXTERN_C __declspec(selectany) const SXS_ASSEMBLY_IDENTITY_ATTRIBUTE_REFERENCE _id = { _ns, (sizeof(_ns) / sizeof(_ns[0])) - 1, _n, (sizeof(_n) / sizeof(_n[0])) - 1 };
  19. #define SXS_DEFINE_STANDARD_ATTRIBUTE_REFERENCE_EX(_id, _n) EXTERN_C __declspec(selectany) const SXS_ASSEMBLY_IDENTITY_ATTRIBUTE_REFERENCE _id = { NULL, 0, _n, (sizeof(_n) / sizeof(_n[0])) - 1 };
  20. SXS_DEFINE_STANDARD_ATTRIBUTE_REFERENCE_EX(s_IdentityAttribute_name, SXS_ASSEMBLY_IDENTITY_STD_ATTRIBUTE_NAME_NAME)
  21. SXS_DEFINE_STANDARD_ATTRIBUTE_REFERENCE_EX(s_IdentityAttribute_type, SXS_ASSEMBLY_IDENTITY_STD_ATTRIBUTE_NAME_TYPE)
  22. SXS_DEFINE_STANDARD_ATTRIBUTE_REFERENCE_EX(s_IdentityAttribute_version, SXS_ASSEMBLY_IDENTITY_STD_ATTRIBUTE_NAME_VERSION)
  23. SXS_DEFINE_STANDARD_ATTRIBUTE_REFERENCE_EX(s_IdentityAttribute_processorArchitecture, SXS_ASSEMBLY_IDENTITY_STD_ATTRIBUTE_NAME_PROCESSOR_ARCHITECTURE)
  24. SXS_DEFINE_STANDARD_ATTRIBUTE_REFERENCE_EX(s_IdentityAttribute_publicKey, SXS_ASSEMBLY_IDENTITY_STD_ATTRIBUTE_NAME_PUBLIC_KEY)
  25. SXS_DEFINE_STANDARD_ATTRIBUTE_REFERENCE_EX(s_IdentityAttribute_publicKeyToken, SXS_ASSEMBLY_IDENTITY_STD_ATTRIBUTE_NAME_PUBLIC_KEY_TOKEN)
  26. SXS_DEFINE_STANDARD_ATTRIBUTE_REFERENCE_EX(s_IdentityAttribute_language, SXS_ASSEMBLY_IDENTITY_STD_ATTRIBUTE_NAME_LANGUAGE)
  27. //
  28. // This header defines the "semi-public" assembly identity functions.
  29. //
  30. // The public ones are in sxsapi.h; these are not private to the identity
  31. // implementation directly but are private to sxs.dll.
  32. //
  33. BOOL
  34. SxsIsAssemblyIdentityAttributePresent(
  35. DWORD Flags,
  36. PCASSEMBLY_IDENTITY pAssemblyIdentity,
  37. PCSXS_ASSEMBLY_IDENTITY_ATTRIBUTE_REFERENCE AttributeReference,
  38. BOOL *pfFound
  39. );
  40. #define SXSP_SET_ASSEMBLY_IDENTITY_ATTRIBUTE_VALUE_FLAG_OVERWRITE_EXISTING (0x00000001)
  41. BOOL
  42. SxspSetAssemblyIdentityAttributeValue(
  43. DWORD Flags,
  44. struct _ASSEMBLY_IDENTITY* pAssemblyIdentity,
  45. PCSXS_ASSEMBLY_IDENTITY_ATTRIBUTE_REFERENCE AttributeReference,
  46. PCWSTR pszValue,
  47. SIZE_T cchValue
  48. );
  49. // adriaanc
  50. /*
  51. BOOL
  52. SxspSetAssemblyIdentityAttributeValue(
  53. DWORD Flags,
  54. struct _ASSEMBLY_IDENTITY* pAssemblyIdentity,
  55. PCSXS_ASSEMBLY_IDENTITY_ATTRIBUTE_REFERENCE AttributeReference,
  56. const CBaseStringBuffer &Value
  57. );
  58. */
  59. #define SXSP_REMOVE_ASSEMBLY_IDENTITY_ATTRIBUTE_FLAG_NOT_FOUND_SUCCEEDS (0x00000001)
  60. BOOL
  61. SxspRemoveAssemblyIdentityAttribute(
  62. DWORD Flags,
  63. struct _ASSEMBLY_IDENTITY* pAssemblyIdentity,
  64. PCSXS_ASSEMBLY_IDENTITY_ATTRIBUTE_REFERENCE AttributeReference
  65. );
  66. #define SXSP_GET_ASSEMBLY_IDENTITY_ATTRIBUTE_VALUE_FLAG_NOT_FOUND_RETURNS_NULL (0x00000001)
  67. BOOL
  68. SxspGetAssemblyIdentityAttributeValue(
  69. IN DWORD Flags,
  70. IN PCASSEMBLY_IDENTITY AssemblyIdentity,
  71. PCSXS_ASSEMBLY_IDENTITY_ATTRIBUTE_REFERENCE AttributeReference,
  72. OUT PCWSTR *ValuePointer,
  73. OUT SIZE_T *ValueCch
  74. );
  75. //adriaanc
  76. /*
  77. BOOL
  78. SxspGetAssemblyIdentityAttributeValue(
  79. IN DWORD Flags,
  80. IN PCASSEMBLY_IDENTITY AssemblyIdentity,
  81. PCSXS_ASSEMBLY_IDENTITY_ATTRIBUTE_REFERENCE AttributeReference,
  82. OUT CBaseStringBuffer &Value
  83. );
  84. */
  85. VOID
  86. SxspDbgPrintAssemblyIdentity(
  87. DWORD dwflags,
  88. PCASSEMBLY_IDENTITY pAssemblyIdentity
  89. );
  90. #define SXSP_MAP_ASSEMBLY_IDENTITY_TO_POLICY_IDENTITY_FLAG_OMIT_ENTIRE_VERSION (0x00000001)
  91. BOOL
  92. SxspMapAssemblyIdentityToPolicyIdentity(
  93. IN DWORD Flags,
  94. IN PCASSEMBLY_IDENTITY AssemblyIdentity,
  95. OUT PASSEMBLY_IDENTITY &PolicyIdentity
  96. );
  97. #define SXSP_GENERATE_TEXTUALLY_ENCODED_POLICY_IDENTITY_FROM_ASSEMBLY_IDENTITY_FLAG_OMIT_ENTIRE_VERSION (0x00000001)
  98. // adriaanc
  99. /*
  100. BOOL
  101. SxspGenerateTextuallyEncodedPolicyIdentityFromAssemblyIdentity(
  102. DWORD Flags,
  103. PCASSEMBLY_IDENTITY AssemblyIdentity,
  104. CBaseStringBuffer &rbuffEncodedIdentity,
  105. PASSEMBLY_IDENTITY *PolicyIdentity OPTIONAL
  106. );
  107. */
  108. #endif // !defined(_FUSION_INC_SXSID_H_INCLUDED_)