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.

79 lines
2.5 KiB

  1. #pragma once
  2. #include "MigrationBase.h"
  3. //---------------------------------------------------------------------------
  4. // CUserMigration
  5. //---------------------------------------------------------------------------
  6. class ATL_NO_VTABLE CUserMigration :
  7. public CComObjectRootEx<CComSingleThreadModel>,
  8. public IDispatchImpl<IUserMigration, &IID_IUserMigration, &LIBID_ADMT>,
  9. public CMigrationBase
  10. {
  11. public:
  12. CUserMigration();
  13. ~CUserMigration();
  14. DECLARE_NO_REGISTRY()
  15. BEGIN_COM_MAP(CUserMigration)
  16. COM_INTERFACE_ENTRY(IDispatch)
  17. COM_INTERFACE_ENTRY(IUserMigration)
  18. END_COM_MAP()
  19. public:
  20. // IUserMigration
  21. STDMETHOD(put_DisableOption)(long lOption);
  22. STDMETHOD(get_DisableOption)(long* plOption);
  23. STDMETHOD(put_SourceExpiration)(long lExpiration);
  24. STDMETHOD(get_SourceExpiration)(long* plExpiration);
  25. STDMETHOD(put_MigrateSIDs)(VARIANT_BOOL bMigrate);
  26. STDMETHOD(get_MigrateSIDs)(VARIANT_BOOL* pbMigrate);
  27. STDMETHOD(put_TranslateRoamingProfile)(VARIANT_BOOL bTranslate);
  28. STDMETHOD(get_TranslateRoamingProfile)(VARIANT_BOOL* pbTranslate);
  29. STDMETHOD(put_UpdateUserRights)(VARIANT_BOOL bUpdate);
  30. STDMETHOD(get_UpdateUserRights)(VARIANT_BOOL* pbUpdate);
  31. STDMETHOD(put_MigrateGroups)(VARIANT_BOOL bMigrate);
  32. STDMETHOD(get_MigrateGroups)(VARIANT_BOOL* pbMigrate);
  33. STDMETHOD(put_UpdatePreviouslyMigratedObjects)(VARIANT_BOOL bUpdate);
  34. STDMETHOD(get_UpdatePreviouslyMigratedObjects)(VARIANT_BOOL* pbUpdate);
  35. STDMETHOD(put_FixGroupMembership)(VARIANT_BOOL bFix);
  36. STDMETHOD(get_FixGroupMembership)(VARIANT_BOOL* pbFix);
  37. STDMETHOD(put_MigrateServiceAccounts)(VARIANT_BOOL bMigrate);
  38. STDMETHOD(get_MigrateServiceAccounts)(VARIANT_BOOL* pbMigrate);
  39. STDMETHOD(Migrate)(long lOptions, VARIANT vntInclude, VARIANT vntExclude);
  40. protected:
  41. void ValidateMigrationParameters();
  42. virtual void DoNames();
  43. virtual void DoDomain();
  44. void DoContainers(CContainer& rSource, CContainer& rTarget);
  45. void DoUsers(CContainer& rSource, CContainer& rTarget);
  46. void DoUsers(CDomainAccounts& rUsers, CContainer& rTarget);
  47. void RemoveServiceAccounts(CDomainAccounts& rUsers);
  48. void SetOptions(_bstr_t strTargetOu, CVarSet& rVarSet);
  49. void SetAccountOptions(CVarSet& rVarSet);
  50. protected:
  51. long m_lDisableOption;
  52. long m_lSourceExpiration;
  53. bool m_bMigrateSids;
  54. bool m_bTranslateRoamingProfile;
  55. bool m_bUpdateUserRights;
  56. bool m_bMigrateGroups;
  57. bool m_bUpdatePreviouslyMigratedObjects;
  58. bool m_bFixGroupMembership;
  59. bool m_bMigrateServiceAccounts;
  60. };