Source code of Windows XP (NT5)
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.

153 lines
3.8 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows NT **/
  3. /** Copyright(c) Microsoft Corp., 1990, 1991 **/
  4. /**********************************************************************/
  5. /*
  6. uidomain.hxx
  7. This file contains the class declarations for the UI_DOMAIN class.
  8. The UI_DOMAIN class is somewhat similar to the "normal" DOMAIN class.
  9. In fact, UI_DOMAIN *contains* a DOMAIN object. The only external
  10. difference is that UI_DOMAIN::GetInfo will prompt the user for
  11. the name of a known DC if either the MNetGetDCName or I_MNetGetDCList
  12. API fails.
  13. FILE HISTORY:
  14. KeithMo 30-Aug-1992 Created.
  15. */
  16. #ifndef _UIDOMAIN_HXX
  17. #define _UIDOMAIN_HXX
  18. #include "string.hxx"
  19. #include "lmodom.hxx"
  20. //
  21. // Forward references.
  22. //
  23. DLL_CLASS UI_DOMAIN;
  24. DLL_CLASS PROMPT_FOR_ANY_DC_DLG;
  25. /*************************************************************************
  26. NAME: UI_DOMAIN
  27. SYNOPSIS: Similar to DOMAIN, but may prompt for a known DC.
  28. INTERFACE: UI_DOMAIN - Class constructor.
  29. ~UI_DOMAIN - Class destructor.
  30. GetInfo - Invokes the API, may prompt the
  31. user for a known DC.
  32. QueryName - Returns the domain's name.
  33. QueryPDC - Returns the name of the domain's
  34. PDC.
  35. QueryAnyDC - Returns the name of a random
  36. DC in the domain. May return
  37. the name of the Primary DC.
  38. PARENT: BASE
  39. USES: NLS_STR
  40. DOMAIN
  41. HISTORY:
  42. KeithMo 30-Aug-1992 Created.
  43. **************************************************************************/
  44. DLL_CLASS UI_DOMAIN : public BASE
  45. {
  46. private:
  47. PWND2HWND & _wndOwner;
  48. ULONG _hc;
  49. NLS_STR _nlsDomainName;
  50. NLS_STR _nlsBackupDC;
  51. BOOL _fBackupDCsOK;
  52. DOMAIN * _pdomain;
  53. public:
  54. //
  55. // Usual constructor/destructor goodies.
  56. //
  57. UI_DOMAIN( PWND2HWND & wndOwner,
  58. ULONG hc,
  59. const TCHAR * pszDomainName,
  60. BOOL fBackupDCsOK = FALSE );
  61. ~UI_DOMAIN( VOID );
  62. //
  63. // Accessors.
  64. //
  65. APIERR GetInfo( VOID );
  66. const TCHAR * QueryName( VOID ) const;
  67. const TCHAR * QueryPDC( VOID ) const;
  68. const TCHAR * QueryAnyDC( VOID ) const;
  69. }; // class UI_DOMAIN
  70. /*************************************************************************
  71. NAME: PROMPT_FOR_ANY_DC_DLG
  72. SYNOPSIS: Dialog used to prompt the user for a known DC
  73. in a particular domain.
  74. INTERFACE: PROMPT_FOR_ANY_DC_DLG - Class constructor.
  75. ~PROMPT_FOR_ANY_DC_DLG - Class destructor.
  76. PARENT: DIALOG_WINDOW
  77. USES: NLS_STR
  78. SLT
  79. SLE
  80. HISTORY:
  81. KeithMo 30-Aug-1992 Created.
  82. **************************************************************************/
  83. DLL_CLASS PROMPT_FOR_ANY_DC_DLG : public DIALOG_WINDOW
  84. {
  85. private:
  86. ULONG _hc;
  87. NLS_STR * _pnlsKnownDC;
  88. SLT _sltMessage;
  89. SLE _sleKnownDC;
  90. protected:
  91. virtual BOOL OnOK( VOID );
  92. virtual ULONG QueryHelpContext( VOID );
  93. public:
  94. //
  95. // Usual constructor/destructor goodies.
  96. //
  97. PROMPT_FOR_ANY_DC_DLG( PWND2HWND & wndOwner,
  98. ULONG hc,
  99. const NLS_STR * pnlsDomainName,
  100. NLS_STR * pnlsKnownDC );
  101. ~PROMPT_FOR_ANY_DC_DLG( VOID );
  102. }; // class PROMPT_FOR_ANY_DC_DLG
  103. #endif // _UIDOMAIN_HXX