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.

91 lines
2.6 KiB

  1. #pragma once
  2. /*-----------------------------------------------------------------------------
  3. Dynamic Link Library Redirection (contributor)
  4. The dllredir contributor is unique in that it does most of the work
  5. for installation.
  6. -----------------------------------------------------------------------------*/
  7. #include "fusionarray.h"
  8. #include "fusionhandle.h"
  9. class CDllRedir
  10. {
  11. public:
  12. CDllRedir::CDllRedir() : m_SSGenContext(NULL), m_pRunOnce(NULL) { }
  13. ~CDllRedir() { }
  14. VOID ContributorCallback(PACTCTXCTB_CALLBACK_DATA Data);
  15. BOOL
  16. BeginInstall(
  17. PACTCTXCTB_CALLBACK_DATA Data
  18. );
  19. BOOL
  20. InstallManifest(
  21. DWORD dwManifestOperationFlags,
  22. PCACTCTXCTB_ASSEMBLY_CONTEXT AssemblyContext
  23. );
  24. BOOL
  25. InstallCatalog(
  26. DWORD dwManifestOperationFlags,
  27. const CBaseStringBuffer &SourceManifest,
  28. const CBaseStringBuffer &DestinationManifest,
  29. PCACTCTXCTB_ASSEMBLY_CONTEXT AssemblyContext
  30. );
  31. BOOL
  32. InstallFile(
  33. PACTCTXCTB_CALLBACK_DATA Data,
  34. const CBaseStringBuffer &FileNameBuffer
  35. );
  36. BOOL
  37. AttemptInstallPolicies(
  38. const CBaseStringBuffer &m_strTempRootSlash,
  39. const CBaseStringBuffer &moveDestination,
  40. const BOOL fReplaceExisting,
  41. OUT BOOL &fFoundPolicesToInstall
  42. );
  43. BOOL
  44. EndInstall(
  45. PACTCTXCTB_CALLBACK_DATA Data
  46. );
  47. PSTRING_SECTION_GENERATION_CONTEXT m_SSGenContext;
  48. // these are files the callback said it would copy itself,
  49. // we check that this happens before EndAssemblyInstall does the
  50. // rest of its work
  51. typedef CFusionArray<CFusionFilePathAndSize> CQueuedFileCopies;
  52. CQueuedFileCopies m_queuedFileCopies;
  53. // For partial atomicity, we install everything here, which is
  54. // like \Winnt\SideBySide\{Guid} and then to commit we enumerate
  55. // it and move all the directories in it up one level, and delete it
  56. CStringBuffer m_strTempRootSlash;
  57. // This must be seperately heap allocated.
  58. // It should delete itself in Close or Cancel.
  59. CRunOnceDeleteDirectory *m_pRunOnce;
  60. struct _ContributorCallbackLocalsStruct
  61. {
  62. CSmallStringBuffer DllUnderSystem32;
  63. CSmallStringBuffer FileNameBuffer;
  64. CSmallStringBuffer LoadFromBuffer;
  65. CSmallStringBuffer HashValueBuffer;
  66. #ifdef _WIN64
  67. CSmallStringBuffer DllUnderSyswow64;
  68. #endif
  69. } ContributorCallbackLocals;
  70. private:
  71. CDllRedir(const CDllRedir &);
  72. void operator =(const CDllRedir &);
  73. };