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.

227 lines
5.7 KiB

  1. #pragma once
  2. #include "resource.h" // main symbols
  3. // From VC98/MFC/Include
  4. #include <afx.h>
  5. #include <afxdisp.h>
  6. // From VC98/Include
  7. #include <io.h>
  8. #include <stdio.h>
  9. #include <stdlib.h>
  10. #include <string.h>
  11. #include <time.h>
  12. #include <FCNTL.H>
  13. #include <sys/stat.h>
  14. #define INC_OLE2
  15. #include <windowsx.h> // for SetWindowFont
  16. #include <objbase.h>
  17. #include <PrSht.h>
  18. #include <shlobj.h>
  19. #include <lm.h>
  20. // From Platform SDK/Include
  21. #include <HtmlHelp.h>
  22. #include <objsel.h>
  23. #include <DSCLIENT.H>
  24. #include <dsgetdc.h>
  25. #include <map>
  26. #include "ResStr.h"
  27. #include "TReg.hpp"
  28. #include "ErrDct.hpp"
  29. #include "WNetUtil.h"
  30. #include "OuSelect.h"
  31. #include "TrstDlg.h"
  32. #include "HelpID.h"
  33. #include "SidHistoryFlags.h"
  34. #include "UString.hpp"
  35. #include "HrMsg.h"
  36. #include "Validation.h"
  37. //#include "TxtSid.h"
  38. //#import "\bin\MigDrvr.tlb" no_namespace, named_guids
  39. //#import "\bin\McsVarSetMin.tlb" no_namespace, named_guids
  40. //#import "\bin\DBManager.tlb" no_namespace, named_guids
  41. //#import "\bin\McsDctWorkerObjects.tlb" no_namespace, named_guids
  42. //#import "\bin\ScmMigr.tlb" no_namespace, named_guids
  43. //#import "\bin\TrustMgr.tlb" no_namespace, named_guids
  44. #import "MigDrvr.tlb" no_namespace, named_guids
  45. #import "VarSet.tlb" no_namespace, named_guids rename("property", "aproperty")
  46. #import "DBMgr.tlb" no_namespace, named_guids
  47. #import "WorkObj.tlb" no_namespace, named_guids
  48. #import "ScmMigr.tlb" no_namespace, named_guids
  49. #import "TrustMgr.tlb" no_namespace, named_guids
  50. #import "AdsProp.tlb" no_namespace
  51. #import "MsPwdMig.tlb" no_namespace
  52. #define SvcAcctStatus_NotMigratedYet 0
  53. #define SvcAcctStatus_DoNotUpdate 1
  54. #define SvcAcctStatus_Updated 2
  55. #define SvcAcctStatus_UpdateFailed 4
  56. #define SvcAcctStatus_NeverAllowUpdate 8
  57. #define w_account 1
  58. #define w_group 2
  59. #define w_computer 3
  60. #define w_security 4
  61. #define w_service 5
  62. #define w_undo 6
  63. #define w_exchangeDir 7
  64. #define w_reporting 8
  65. #define w_retry 9
  66. #define w_trust 10
  67. #define w_exchangeSrv 11
  68. #define w_groupmapping 12
  69. #ifndef BIF_USENEWUI
  70. #define BIF_USENEWUI 0x0040
  71. #endif
  72. #define REAL_PSH_WIZARD97 0x01000000
  73. typedef int (CALLBACK * DSBROWSEFORCONTAINER)(PDSBROWSEINFOW dsInfo);
  74. extern DSBROWSEFORCONTAINER DsBrowseForContainerX;
  75. typedef struct SHAREDWIZDATA {
  76. HFONT hTitleFont;
  77. bool IsSidHistoryChecked;
  78. int renameSwitch;
  79. bool prefixorsuffix;
  80. bool expireSwitch;
  81. bool refreshing;
  82. bool someService;
  83. bool memberSwitch;
  84. bool proceed;
  85. bool translateObjects;
  86. long rebootDelay;
  87. int accounts,servers;
  88. bool sameForest;
  89. bool newSource;
  90. bool resetOUPATH;
  91. bool sourceIsNT4;
  92. bool targetIsNT4;
  93. bool sort[6];
  94. bool migratingGroupMembers;
  95. bool targetIsMixed;
  96. bool secWithMapFile;
  97. } SHAREDWIZDATA, *LPSHAREDWIZDATA;
  98. extern CEdit pEdit ;
  99. extern IVarSet * pVarSet;
  100. extern IVarSet * pVarSetUndo;
  101. extern IVarSet * pVarSetService;
  102. extern IIManageDB * db;
  103. extern UINT g_cfDsObjectPicker;
  104. extern IDsObjectPicker *pDsObjectPicker;
  105. extern IDataObject *pdo;
  106. extern IDsObjectPicker *pDsObjectPicker2;
  107. extern IDataObject *pdo2;
  108. extern int migration;
  109. extern CComModule _Module;
  110. extern CListCtrl m_listBox;
  111. extern CListCtrl m_cancelBox;
  112. extern CListCtrl m_reportingBox;
  113. extern CListCtrl m_serviceBox;
  114. extern CComboBox m_rebootBox;
  115. extern CListCtrl m_trustBox;
  116. extern CString sourceDNS;
  117. extern CString targetDNS;
  118. extern CString sourceNetbios;
  119. extern CString targetNetbios;
  120. extern StringLoader gString;
  121. extern TErrorDct err;
  122. extern CComboBox sourceDrop;
  123. extern CComboBox targetDrop;
  124. extern bool alreadyRefreshed;
  125. extern BOOL gbNeedToVerify;
  126. extern _bstr_t yes,no;
  127. extern _bstr_t yes,no;
  128. extern CString lastInitializedTo;
  129. extern CComboBox additionalDrop;
  130. extern bool clearCredentialsName;
  131. extern CString sourceDC;
  132. extern CStringList DCList;
  133. //
  134. // Define a map that maps an attribute's LDAP Display Name to it's OID.
  135. // Note that the key comparison is defined to be case in-sensitive.
  136. //
  137. struct lessPropertyNameToOID
  138. {
  139. bool operator()(const CString strA, const CString strB) const
  140. {
  141. return strA.CompareNoCase(strB) < 0;
  142. }
  143. };
  144. typedef std::map<CString, CString, lessPropertyNameToOID> CPropertyNameToOIDMap;
  145. extern CPropertyNameToOIDMap PropIncMap1;
  146. extern CPropertyNameToOIDMap PropExcMap1;
  147. extern CPropertyNameToOIDMap PropIncMap2;
  148. extern CPropertyNameToOIDMap PropExcMap2;
  149. extern CPropertyNameToOIDMap PropIncMap3;
  150. extern CPropertyNameToOIDMap PropExcMap3;
  151. extern CString sType1, sType2, sType3;
  152. extern bool bChangedMigrationTypes;
  153. extern bool bChangeOnFly;
  154. extern CString targetServer;
  155. extern CString targetServerDns;
  156. //
  157. // TODO:
  158. //
  159. inline PCTSTR __stdcall GetSourceDomainName()
  160. {
  161. return sourceDNS.IsEmpty() ? sourceNetbios : sourceDNS;
  162. }
  163. inline PCTSTR __stdcall GetSourceDomainNameDns()
  164. {
  165. return sourceDNS;
  166. }
  167. inline PCTSTR __stdcall GetSourceDomainNameFlat()
  168. {
  169. return sourceNetbios;
  170. }
  171. inline PCTSTR __stdcall GetTargetDomainName()
  172. {
  173. return targetDNS.IsEmpty() ? targetNetbios : targetDNS;
  174. }
  175. inline PCTSTR __stdcall GetTargetDomainNameDns()
  176. {
  177. return targetDNS;
  178. }
  179. inline PCTSTR __stdcall GetTargetDomainNameFlat()
  180. {
  181. return targetNetbios;
  182. }
  183. inline PCTSTR __stdcall GetTargetDcName()
  184. {
  185. return targetServerDns.IsEmpty() ? targetServer : targetServerDns;
  186. }
  187. inline PCTSTR __stdcall GetTargetDcNameDns()
  188. {
  189. return targetServerDns;
  190. }
  191. inline PCTSTR __stdcall GetTargetDcNameFlat()
  192. {
  193. return targetServer;
  194. }