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.

66 lines
1.6 KiB

  1. #pragma once
  2. #include "fusionarray.h"
  3. #include "sxsapi.h"
  4. #include "csecuritymetadata.h"
  5. #define SXSRECOVER_MODE_MASK ( 0x0000000F )
  6. #define SXSRECOVER_NOTHING ( 0x00000000 )
  7. #define SXSRECOVER_MANIFEST ( 0x00000001 )
  8. #define SXSRECOVER_ASSEMBLYMEMBER ( 0x00000002 )
  9. #define SXSRECOVER_FULL_ASSEMBLY ( SXSRECOVER_ASSEMBLYMEMBER | SXSRECOVER_MANIFEST )
  10. enum SxsRecoveryResult
  11. {
  12. Recover_OK,
  13. Recover_ManifestMissing,
  14. Recover_CatalogInvalid,
  15. Recover_OneOrMoreFailed,
  16. Recover_SourceMissing,
  17. Recover_Unknown
  18. };
  19. #if DBG
  20. #define ENUM_TO_STRING( x ) case x: return (L#x)
  21. inline PCWSTR SxspRecoveryResultToString( const SxsRecoveryResult r )
  22. {
  23. switch ( r )
  24. {
  25. ENUM_TO_STRING( Recover_OK );
  26. ENUM_TO_STRING( Recover_ManifestMissing );
  27. ENUM_TO_STRING( Recover_CatalogInvalid );
  28. ENUM_TO_STRING( Recover_OneOrMoreFailed );
  29. ENUM_TO_STRING( Recover_SourceMissing );
  30. ENUM_TO_STRING( Recover_Unknown );
  31. }
  32. return L"Bad SxsRecoveryResult value";
  33. }
  34. #undef ENUM_TO_STRING
  35. #endif
  36. class CAssemblyRecoveryInfo;
  37. BOOL
  38. SxspOpenAssemblyInstallationKey(
  39. DWORD dwFlags,
  40. DWORD dwAccess,
  41. CRegKey &rhkAssemblyInstallation
  42. );
  43. BOOL
  44. SxspRecoverAssembly(
  45. IN const CAssemblyRecoveryInfo &AsmRecoverInfo,
  46. OUT SxsRecoveryResult &rStatus
  47. );
  48. #define SXSP_ADD_ASSEMBLY_INSTALLATION_INFO_FLAG_REFRESH (0x00000001)
  49. BOOL
  50. SxspAddAssemblyInstallationInfo(
  51. DWORD dwFlags,
  52. IN CAssemblyRecoveryInfo& rcAssemblyInfo,
  53. IN const CCodebaseInformation& rcCodebaeInfo
  54. );