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.

116 lines
3.0 KiB

  1. #pragma once
  2. class CCabinetData
  3. {
  4. PRIVATIZE_COPY_CONSTRUCTORS(CCabinetData);
  5. bool m_fDoExtraction;
  6. CStringBuffer m_sbBaseExpansionPath;
  7. BOOL m_fReplaceExisting;
  8. public:
  9. CCabinetData() { Initialize(); }
  10. ~CCabinetData() { }
  11. bool IsExtracting() { return m_fDoExtraction; }
  12. //
  13. // Array of assemblies extracted
  14. //
  15. CFusionArray<CStringBuffer> m_AssembliesExtracted;
  16. const CBaseStringBuffer& BasePath() const { return m_sbBaseExpansionPath; }
  17. void SetReplaceExisting(BOOL fReplaceExisting)
  18. {
  19. this->m_fReplaceExisting = fReplaceExisting;
  20. }
  21. BOOL GetReplaceExisting() const
  22. {
  23. return this->m_fReplaceExisting;
  24. }
  25. void Initialize()
  26. {
  27. this->m_fReplaceExisting = FALSE;
  28. this->m_pfnShouldExtractThisFileFromCabCallback = NULL;
  29. this->m_pvShouldExtractThisFileFromCabCallbackContext = NULL;
  30. this->m_fDoExtraction = false;
  31. this->m_sbBaseExpansionPath.Clear();
  32. this->sxs_FdiExtractionNotify_fdintCOPY_FILE.Clear();
  33. }
  34. BOOL Initialize(const CBaseStringBuffer& strBasePath, bool fActuallyExtract = false)
  35. {
  36. FN_PROLOG_WIN32
  37. IFW32FALSE_EXIT(m_AssembliesExtracted.Win32Reset(CFusionArray<CStringBuffer>::eResetModeZeroSize));
  38. IFW32FALSE_EXIT(m_sbBaseExpansionPath.Win32Assign(strBasePath));
  39. m_fDoExtraction = fActuallyExtract;
  40. FN_EPILOG
  41. }
  42. struct _CopyFileLocalsStruct
  43. {
  44. void Clear()
  45. {
  46. TempBuffer.Clear();
  47. TempBuffer2.Clear();
  48. }
  49. CStringBuffer TempBuffer;
  50. CStringBuffer TempBuffer2;
  51. } sxs_FdiExtractionNotify_fdintCOPY_FILE;
  52. void Clear()
  53. {
  54. Initialize();
  55. }
  56. typedef
  57. BOOL (*SXSP_PFN_SHOULD_EXTRACT_THIS_FILE_FROM_CAB_CALLBACK)(
  58. const CBaseStringBuffer &PathInCab,
  59. bool &rfShouldExtract,
  60. PVOID Context
  61. );
  62. SXSP_PFN_SHOULD_EXTRACT_THIS_FILE_FROM_CAB_CALLBACK m_pfnShouldExtractThisFileFromCabCallback;
  63. PVOID m_pvShouldExtractThisFileFromCabCallbackContext;
  64. };
  65. BOOL
  66. SxspRecoverAssemblyFromCabinet(
  67. const CBaseStringBuffer &CabinetPath,
  68. const CBaseStringBuffer &AssemblyIdentity,
  69. PSXS_INSTALLW pInstall);
  70. BOOL
  71. SxspExpandCabinetIntoTemp(
  72. DWORD dwFlags,
  73. const CBaseStringBuffer& CabinetPath,
  74. CImpersonationData& ImpersonateData,
  75. CCabinetData* pCabinetData = NULL
  76. );
  77. class CAssemblyInstall;
  78. BOOL
  79. SxspInstallAsmsDotCabEtAl(
  80. DWORD dwFlags,
  81. CAssemblyInstall &AssemblyContext,
  82. const CBaseStringBuffer &CabinetBasePath,
  83. CFusionArray<CStringBuffer> *pAssembliesToInstall
  84. );
  85. class CSxspInstallAsmsDotCabEtAlLocals;
  86. BOOL
  87. SxspInstallAsmsDotCabEtAl(
  88. DWORD dwFlags,
  89. CAssemblyInstall &AssemblyContext,
  90. const CBaseStringBuffer &CabinetBasePath,
  91. CFusionArray<CStringBuffer> *pAssembliesToInstall,
  92. CSxspInstallAsmsDotCabEtAlLocals & Locals
  93. );