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.

168 lines
6.1 KiB

  1. #ifndef __RSOP_WIZARD_DLG_H__
  2. #define __RSOP_WIZARD_DLG_H__
  3. //+--------------------------------------------------------------------------
  4. //
  5. // Microsoft Windows
  6. // Copyright (C) Microsoft Corporation, 1994 - 2001.
  7. //
  8. // File: RSOPWizardDlg.h
  9. //
  10. // Contents: Definitions for the RSOP Wizard dialog class
  11. //
  12. // Classes: CRSOPWizardDlg
  13. //
  14. // Functions:
  15. //
  16. // History: 08-08-2001 rhynierm Created
  17. //
  18. //---------------------------------------------------------------------------
  19. #include "RSOPQuery.h"
  20. // Forward declaration
  21. class CRSOPExtendedProcessing;
  22. //
  23. // CRSOPWizardDlg class
  24. //
  25. class CRSOPWizardDlg
  26. {
  27. public:
  28. //
  29. // Constructors/destructor
  30. //
  31. CRSOPWizardDlg( LPRSOP_QUERY pQuery, CRSOPExtendedProcessing* pExtendedProcessing );
  32. ~CRSOPWizardDlg();
  33. VOID FreeUserData();
  34. VOID FreeComputerData();
  35. public:
  36. //
  37. // Wizard interface
  38. //
  39. HRESULT ShowWizard( HWND hParent );
  40. HRESULT RunQuery( HWND hParent );
  41. LPRSOP_QUERY_RESULTS GetResults() const
  42. { return m_pRSOPQueryResults; }
  43. private:
  44. //
  45. // Static RSOP data generation/manipulation
  46. //
  47. static INT_PTR CALLBACK InitRsopDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
  48. private:
  49. //
  50. // Property sheet/dialog box handlers
  51. //
  52. static INT_PTR CALLBACK RSOPWelcomeDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
  53. static INT_PTR CALLBACK RSOPChooseModeDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
  54. static INT_PTR CALLBACK RSOPGetCompDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
  55. static INT_PTR CALLBACK RSOPGetUserDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
  56. static INT_PTR CALLBACK RSOPGetTargetDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
  57. static INT_PTR CALLBACK RSOPGetDCDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
  58. static INT_PTR CALLBACK RSOPAltDirsDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
  59. static INT_PTR CALLBACK RSOPAltUserSecDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
  60. static INT_PTR CALLBACK RSOPAltCompSecDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
  61. static INT_PTR CALLBACK RSOPWQLUserDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
  62. static INT_PTR CALLBACK RSOPWQLCompDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
  63. static INT_PTR CALLBACK RSOPFinishedDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
  64. static INT_PTR CALLBACK RSOPFinished2DlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
  65. static INT_PTR CALLBACK RSOPChooseDCDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
  66. static INT CALLBACK DsBrowseCallback (HWND hwnd, UINT uMsg, LPARAM lParam, LPARAM lpData);
  67. static INT_PTR CALLBACK BrowseDCDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
  68. private:
  69. //
  70. // Dialog helper methods
  71. //
  72. HRESULT SetupFonts();
  73. HRESULT FillUserList (HWND hList, BOOL* pbCurrentUserFound, BOOL* pbFixedUserFound);
  74. VOID EscapeString (LPTSTR *lpString);
  75. VOID InitializeSitesInfo (HWND hDlg);
  76. BOOL IsComputerRSoPEnabled(LPTSTR lpDCName);
  77. BOOL TestAndValidateComputer(HWND hDlg);
  78. VOID InitializeDCInfo (HWND hDlg);
  79. DWORD GetDefaultGroupCount();
  80. VOID AddDefaultGroups (HWND hLB);
  81. HRESULT BuildMembershipList (HWND hLB, IDirectoryObject * pDSObj, DWORD* pdwCount, LPTSTR** paszSecGrps, DWORD** padwSecGrpAttr);
  82. VOID GetPrimaryGroup (HWND hLB, IDirectoryObject * pDSObj);
  83. HRESULT SaveSecurityGroups (HWND hLB, DWORD* pdwCount, LPTSTR** paszSecGrps, DWORD** padwSecGrpAttr);
  84. VOID FillListFromSecurityGroups(HWND hLB, DWORD dwCount, LPTSTR* aszSecurityGroups, DWORD* adwSecGrpAttr);
  85. VOID FillListFromWQLFilters( HWND hLB, DWORD dwCount, LPTSTR* aszNames, LPTSTR* aszFilters );
  86. VOID AddSiteToDlg (HWND hDlg, LPWSTR szSitePath);
  87. VOID BuildWQLFilterList (HWND hDlg, BOOL bUser, DWORD* pdwCount, LPTSTR** paszNames, LPTSTR** paszFilters );
  88. HRESULT SaveWQLFilters (HWND hLB, DWORD* pdwCount, LPTSTR** paszNames, LPTSTR**paszFilters );
  89. BOOL CompareStringLists( DWORD dwCountA, LPTSTR* aszListA, DWORD dwCountB, LPTSTR* aszListB );
  90. LPTSTR GetDefaultSOM (LPTSTR lpDNName);
  91. HRESULT TestSOM (LPTSTR lpSOM, HWND hDlg);
  92. private:
  93. BOOL m_bPostXPBuild;
  94. DWORD m_dwSkippedFrom;
  95. // Dialog fonts
  96. HFONT m_BigBoldFont;
  97. HFONT m_BoldFont;
  98. // Used to prevent the user from cancelling the query
  99. BOOL m_bFinalNextClicked;
  100. // Final RSOP information
  101. LPRSOP_QUERY m_pRSOPQuery;
  102. LPRSOP_QUERY_RESULTS m_pRSOPQueryResults;
  103. HRESULT m_hrQuery;
  104. BOOL m_bNoChooseQuery;
  105. // RM: variables that belong only in the dialogs
  106. LPTSTR m_szDefaultUserSOM;
  107. LPTSTR m_szDefaultComputerSOM;
  108. IDirectoryObject* m_pComputerObject;
  109. IDirectoryObject * m_pUserObject;
  110. BOOL m_bDollarRemoved;
  111. BOOL m_bNoCurrentUser;
  112. DWORD m_dwDefaultUserSecurityGroupCount;
  113. LPTSTR* m_aszDefaultUserSecurityGroups;
  114. DWORD* m_adwDefaultUserSecurityGroupsAttr;
  115. DWORD m_dwDefaultUserWQLFilterCount;
  116. LPTSTR* m_aszDefaultUserWQLFilterNames;
  117. LPTSTR* m_aszDefaultUserWQLFilters;
  118. DWORD m_dwDefaultComputerSecurityGroupCount;
  119. LPTSTR* m_aszDefaultComputerSecurityGroups;
  120. DWORD* m_adwDefaultComputerSecurityGroupsAttr;
  121. DWORD m_dwDefaultComputerWQLFilterCount;
  122. LPTSTR* m_aszDefaultComputerWQLFilterNames;
  123. LPTSTR* m_aszDefaultComputerWQLFilters;
  124. CRSOPExtendedProcessing* m_pExtendedProcessing;
  125. LONG m_lPlanningFinishedPage;
  126. LONG m_lLoggingFinishedPage;
  127. };
  128. #endif