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.

106 lines
3.2 KiB

  1. // AccntCmt.h : Declaration of the CAddUser_AccntCommit
  2. #ifndef _ACCNTCMT_H
  3. #define _ACCNTCMT_H
  4. #include "AUsrUtil.h"
  5. #include "resource.h" // main symbols
  6. #define ERROR_CREATION 0x01
  7. #define ERROR_PROPERTIES 0x02
  8. #define ERROR_MAILBOX 0x04
  9. #define ERROR_MEMBERSHIPS 0x08
  10. #define ERROR_PASSWORD 0x10
  11. #define ERROR_DUPE 0x20
  12. class CAddUser_AccntCommit;
  13. // ----------------------------------------------------------------------------
  14. // class CUserInfo
  15. // ----------------------------------------------------------------------------
  16. class CUserInfo
  17. {
  18. public:
  19. CUserInfo(IPropertyPagePropertyBag * pPPPBag, CAddUser_AccntCommit * pCmt);
  20. HRESULT ReadBag();
  21. HRESULT CreateAccount();
  22. HRESULT CreateMailbox();
  23. HRESULT CreatePOP3Mailbox();
  24. HRESULT SetPasswd();
  25. HRESULT JoinToDomainUsers();
  26. private:
  27. // User Stuff
  28. CString m_csUserOU;
  29. CString m_csUserName;
  30. CString m_csUserCN;
  31. CString m_csPasswd;
  32. CString m_csUserNamePre2k;
  33. CString m_csFirstName;
  34. CString m_csLastName;
  35. CString m_csFullName;
  36. CString m_csTelephone;
  37. CString m_csOffice;
  38. CString m_csDesc;
  39. DWORD m_dwAccountOptions;
  40. // Server Stuff
  41. CString m_csLogonDns;
  42. CString m_csDomainName;
  43. CString m_csFQDomainName;
  44. // Mailbox stuff
  45. BOOL m_bPOP3;
  46. CString m_csEXAlias;
  47. CString m_csEXServer;
  48. CString m_csEXHomeServer;
  49. CString m_csEXHomeMDB;
  50. IPropertyPagePropertyBag * m_pPPPBag;
  51. CAddUser_AccntCommit * m_pCmt;
  52. };
  53. // ----------------------------------------------------------------------------
  54. // CAddUser_AccntCommit
  55. // ----------------------------------------------------------------------------
  56. class ATL_NO_VTABLE CAddUser_AccntCommit :
  57. public CComObjectRootEx<CComSingleThreadModel>,
  58. public CComCoClass<CAddUser_AccntCommit, &CLSID_AddUser_AccntCommit>,
  59. public IDispatchImpl<IWizardCommit, &__uuidof(IWizardCommit), &LIBID_ACCNTDLLLib>
  60. {
  61. public:
  62. CAddUser_AccntCommit()
  63. {
  64. m_dwErrCode = 0;
  65. m_csErrStr = L"";
  66. m_csADName = L"";
  67. }
  68. DECLARE_REGISTRY_RESOURCEID(IDR_AUSR_ACCNT_COMMIT)
  69. DECLARE_NOT_AGGREGATABLE(CAddUser_AccntCommit)
  70. DECLARE_PROTECT_FINAL_CONSTRUCT()
  71. BEGIN_COM_MAP(CAddUser_AccntCommit)
  72. COM_INTERFACE_ENTRY(IWizardCommit)
  73. COM_INTERFACE_ENTRY(IDispatch)
  74. END_COM_MAP()
  75. // IWizardCommit
  76. STDMETHOD(Commit)(IDispatch * pdispPPPBag);
  77. STDMETHOD(Revert)();
  78. // IAddUser_AccntCommit
  79. DWORD m_dwErrCode;
  80. CString m_csErrStr;
  81. CString m_csADName;
  82. void SetErrCode (DWORD dwCode);
  83. HRESULT SetErrorResults (DWORD dwErrType, BOOL bPOP3 = FALSE);
  84. HRESULT WriteErrorResults (IPropertyPagePropertyBag* pPPPBag);
  85. };
  86. #endif //_ACCNTCMT_H_