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.

67 lines
2.2 KiB

  1. /*---------------------------------------------------------------------------
  2. File: ChangeDomain.h
  3. Comments: Implementation class definition for COM object to change the domain
  4. affiliation of a remote computer.
  5. (c) Copyright 1999, Mission Critical Software, Inc., All Rights Reserved
  6. Proprietary and confidential to Mission Critical Software, Inc.
  7. REVISION LOG ENTRY
  8. Revision By: Christy Boles
  9. Revised on 02/15/99 11:23:19
  10. ---------------------------------------------------------------------------
  11. */
  12. // ChangeDomain.h : Declaration of the CChangeDomain
  13. #ifndef __CHANGEDOMAIN_H_
  14. #define __CHANGEDOMAIN_H_
  15. #include "resource.h" // main symbols
  16. #include <comdef.h>
  17. /////////////////////////////////////////////////////////////////////////////
  18. // CChangeDomain
  19. class ATL_NO_VTABLE CChangeDomain :
  20. public CComObjectRootEx<CComSingleThreadModel>,
  21. public CComCoClass<CChangeDomain, &CLSID_ChangeDomain>,
  22. public IDispatchImpl<IChangeDomain, &IID_IChangeDomain, &LIBID_MCSDCTWORKEROBJECTSLib>
  23. {
  24. _bstr_t m_domain;
  25. _bstr_t m_account;
  26. _bstr_t m_password;
  27. _bstr_t m_domainAccount;
  28. BOOL m_bNoChange;
  29. public:
  30. CChangeDomain()
  31. {
  32. m_bNoChange = FALSE;
  33. }
  34. DECLARE_REGISTRY_RESOURCEID(IDR_CHANGEDOMAIN)
  35. DECLARE_PROTECT_FINAL_CONSTRUCT()
  36. BEGIN_COM_MAP(CChangeDomain)
  37. COM_INTERFACE_ENTRY(IChangeDomain)
  38. COM_INTERFACE_ENTRY(IDispatch)
  39. END_COM_MAP()
  40. // IWorkNode
  41. public:
  42. STDMETHOD(Process)(IUnknown *pWorkItem);
  43. // IChangeDomain
  44. public:
  45. STDMETHOD(get_NoChange)(/*[out, retval]*/ BOOL *pVal);
  46. STDMETHOD(put_NoChange)(/*[in]*/ BOOL newVal);
  47. STDMETHOD(ConnectAs)(BSTR domain, BSTR user, BSTR password);
  48. STDMETHOD(ChangeToWorkgroup)(BSTR Computer, BSTR Workgroup, /*[out]*/ BSTR * errStatus);
  49. STDMETHOD(ChangeToDomain)(BSTR ActiveComputerName, BSTR Domain, BSTR TargetComputerName, /*[out]*/ BSTR * errStatus);
  50. STDMETHOD(ChangeToDomainWithSid)(BSTR ActiveComputerName, BSTR Domain,BSTR DomainSid, BSTR DomainController, BSTR TargetComputerName, BSTR SrcPath, /*[out]*/ BSTR * errStatus);
  51. };
  52. #endif //__CHANGEDOMAIN_H_