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.

522 lines
20 KiB

  1. //+--------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1994 - 1997.
  5. //
  6. // File: rsoproot.h
  7. //
  8. // Contents: Definitions for the RSOP Snap-In classes
  9. //
  10. // Classes: CRSOPComponentData - Root RSOP snap-in node
  11. // CRSOPComponentDataCF - class factory for RSOPComponentData
  12. //
  13. // Functions:
  14. //
  15. // History: 09-13-1999 stevebl Created
  16. //
  17. //---------------------------------------------------------------------------
  18. //
  19. // RSOP gpo list data structure
  20. //
  21. typedef struct tagGPOLISTITEM {
  22. LPTSTR lpGPOName;
  23. LPTSTR lpDSPath;
  24. LPTSTR lpSOM;
  25. LPTSTR lpUnescapedSOM;
  26. LPTSTR lpFiltering;
  27. LPBYTE pSD;
  28. DWORD dwVersion;
  29. BOOL bApplied;
  30. struct tagGPOLISTITEM * pNext;
  31. } GPOLISTITEM, *LPGPOLISTITEM;
  32. //
  33. // RSOP CSE data structure
  34. //
  35. typedef struct tagCSEITEM {
  36. LPTSTR lpName;
  37. LPTSTR lpGUID;
  38. DWORD dwStatus;
  39. ULONG ulLoggingStatus;
  40. SYSTEMTIME BeginTime;
  41. SYSTEMTIME EndTime;
  42. LPSOURCEENTRY lpEventSources;
  43. struct tagCSEITEM *pNext;
  44. } CSEITEM, *LPCSEITEM;
  45. //
  46. // Enumerator for tracking loopback mode
  47. //
  48. typedef enum tagLoopbackMode
  49. {
  50. LoopbackNone,
  51. LoopbackReplace,
  52. LoopbackMerge
  53. } LOOPBACKMODE;
  54. //
  55. // CRSOPComponentData class
  56. //
  57. class CRSOPComponentData:
  58. public IComponentData,
  59. public IExtendPropertySheet2,
  60. public IExtendContextMenu,
  61. public IPersistStreamInit,
  62. public ISnapinHelp
  63. {
  64. friend class CRSOPDataObject;
  65. friend class CRSOPSnapIn;
  66. protected:
  67. ULONG m_cRef;
  68. HWND m_hwndFrame;
  69. BOOL m_bOverride;
  70. BOOL m_bDirty;
  71. BOOL m_bRefocusInit;
  72. BOOL m_bArchiveData;
  73. BOOL m_bViewIsArchivedData;
  74. TCHAR m_szArchivedDataGuid[50];
  75. LPCONSOLENAMESPACE m_pScope;
  76. LPCONSOLE m_pConsole;
  77. HSCOPEITEM m_hRoot;
  78. HSCOPEITEM m_hMachine;
  79. HSCOPEITEM m_hUser;
  80. // properties that identify the RSOP data namespace
  81. LPTSTR m_pDisplayName;
  82. BOOL m_bDiagnostic;
  83. LPTSTR m_szNamespace;
  84. BOOL m_bInitialized;
  85. // properties used by the wizard to determine the RSOP data namespace
  86. LPTSTR m_szComputerName;
  87. LPTSTR m_szComputerDNName;
  88. LPTSTR m_szComputerSOM;
  89. LPTSTR m_szDefaultComputerSOM;
  90. SAFEARRAY * m_saComputerSecurityGroups;
  91. DWORD * m_saComputerSecurityGroupsAttr;
  92. SAFEARRAY * m_saDefaultComputerSecurityGroups;
  93. DWORD * m_saDefaultComputerSecurityGroupsAttr;
  94. SAFEARRAY * m_saComputerWQLFilters;
  95. SAFEARRAY * m_saComputerWQLFilterNames;
  96. SAFEARRAY * m_saDefaultComputerWQLFilters;
  97. SAFEARRAY * m_saDefaultComputerWQLFilterNames;
  98. BOOL m_bSkipComputerWQLFilter;
  99. BOOL m_bSkipUserWQLFilter;
  100. IDirectoryObject * m_pComputerObject;
  101. BOOL m_bNoComputerData; // only used in diagnostic mode
  102. BOOL m_bComputerDeniedAccess;
  103. LPTSTR m_szSite;
  104. LPTSTR m_szDC;
  105. BOOL m_bSlowLink;
  106. LOOPBACKMODE m_loopbackMode;
  107. LPTSTR m_szUserName;
  108. LPTSTR m_szUserDNName;
  109. LPTSTR m_szUserDisplayName; // only used in diagnostic mode
  110. LPTSTR m_szUserSOM;
  111. LPTSTR m_szDefaultUserSOM;
  112. SAFEARRAY * m_saUserSecurityGroups;
  113. DWORD * m_saUserSecurityGroupsAttr;
  114. SAFEARRAY * m_saDefaultUserSecurityGroups;
  115. DWORD * m_saDefaultUserSecurityGroupsAttr;
  116. SAFEARRAY * m_saUserWQLFilters;
  117. SAFEARRAY * m_saUserWQLFilterNames;
  118. SAFEARRAY * m_saDefaultUserWQLFilters;
  119. SAFEARRAY * m_saDefaultUserWQLFilterNames;
  120. IDirectoryObject * m_pUserObject;
  121. BOOL m_bNoUserData; // only used in diagnostic mode
  122. BOOL m_bUserDeniedAccess;
  123. DWORD m_dwSkippedFrom;
  124. HBITMAP m_hChooseBitmap;
  125. // GPO List data
  126. LPGPOLISTITEM m_pUserGPOList;
  127. LPGPOLISTITEM m_pComputerGPOList;
  128. // CSE list data
  129. LPCSEITEM m_pUserCSEList;
  130. LPCSEITEM m_pComputerCSEList;
  131. BOOL m_bUserCSEError;
  132. BOOL m_bComputerCSEError;
  133. BOOL m_bUserGPCoreError;
  134. BOOL m_bComputerGPCoreError;
  135. HMODULE m_hRichEdit;
  136. // cmd line args to the msc file
  137. LPTSTR m_szUserSOMPref;
  138. LPTSTR m_szComputerSOMPref;
  139. LPTSTR m_szUserNamePref;
  140. LPTSTR m_szComputerNamePref;
  141. LPTSTR m_szSitePref;
  142. LPTSTR m_szDCPref;
  143. DWORD m_dwLoadFlags;
  144. // Event log data
  145. CEvents * m_pEvents;
  146. IStream * m_pStm;
  147. public:
  148. CRSOPComponentData();
  149. ~CRSOPComponentData();
  150. VOID FreeUserData (VOID);
  151. VOID FreeComputerData (VOID);
  152. // IUnknown methods
  153. STDMETHODIMP QueryInterface(REFIID, LPVOID FAR *);
  154. STDMETHODIMP_(ULONG) AddRef();
  155. STDMETHODIMP_(ULONG) Release();
  156. //
  157. // Implemented IComponentData methods
  158. //
  159. STDMETHODIMP Initialize(LPUNKNOWN pUnknown);
  160. STDMETHODIMP CreateComponent(LPCOMPONENT* ppComponent);
  161. STDMETHODIMP QueryDataObject(MMC_COOKIE cookie, DATA_OBJECT_TYPES type, LPDATAOBJECT* ppDataObject);
  162. STDMETHODIMP Destroy(void);
  163. STDMETHODIMP Notify(LPDATAOBJECT lpDataObject, MMC_NOTIFY_TYPE event, LPARAM arg, LPARAM param);
  164. STDMETHODIMP GetDisplayInfo(LPSCOPEDATAITEM pItem);
  165. STDMETHODIMP CompareObjects(LPDATAOBJECT lpDataObjectA, LPDATAOBJECT lpDataObjectB);
  166. //
  167. // Implemented IExtendPropertySheet2 methods
  168. //
  169. STDMETHODIMP CreatePropertyPages(LPPROPERTYSHEETCALLBACK lpProvider,
  170. LONG_PTR handle, LPDATAOBJECT lpDataObject);
  171. STDMETHODIMP QueryPagesFor(LPDATAOBJECT lpDataObject);
  172. STDMETHODIMP GetWatermarks(LPDATAOBJECT lpIDataObject, HBITMAP* lphWatermark,
  173. HBITMAP* lphHeader, HPALETTE* lphPalette, BOOL* pbStretch);
  174. //
  175. // Implemented IExtendContextMenu methods
  176. //
  177. STDMETHODIMP AddMenuItems(LPDATAOBJECT piDataObject, LPCONTEXTMENUCALLBACK pCallback,
  178. LONG *pInsertionAllowed);
  179. STDMETHODIMP Command(LONG lCommandID, LPDATAOBJECT piDataObject);
  180. //
  181. // Implemented IPersistStreamInit interface members
  182. //
  183. STDMETHODIMP GetClassID(CLSID *pClassID);
  184. STDMETHODIMP IsDirty(VOID);
  185. STDMETHODIMP Load(IStream *pStm);
  186. STDMETHODIMP Save(IStream *pStm, BOOL fClearDirty);
  187. STDMETHODIMP GetSizeMax(ULARGE_INTEGER *pcbSize);
  188. STDMETHODIMP InitNew(VOID);
  189. STDMETHODIMP CopyFileToMSC (LPTSTR lpFileName, IStream *pStm);
  190. STDMETHODIMP InitializeRSOPFromArchivedData(IStream *pStm);
  191. STDMETHODIMP CreateNameSpace (LPTSTR lpNameSpace, LPTSTR lpParentNameSpace);
  192. STDMETHODIMP CopyMSCToFile (IStream *pStm, LPTSTR *lpMofFileName);
  193. STDMETHODIMP BuildDisplayName (void);
  194. //
  195. // Helpers for IRSOPInformation
  196. //
  197. STDMETHODIMP GetNamespace(DWORD dwSection, LPOLESTR pszNamespace, INT ccMaxLength);
  198. STDMETHODIMP GetFlags(DWORD * pdwFlags);
  199. STDMETHODIMP GetEventLogEntryText(LPOLESTR pszEventSource, LPOLESTR pszEventLogName,
  200. LPOLESTR pszEventTime, DWORD dwEventID, LPOLESTR *ppszText);
  201. //
  202. // Implemented ISnapinHelp interface members
  203. //
  204. STDMETHODIMP GetHelpTopic(LPOLESTR *lpCompiledHelpFile);
  205. VOID AddSiteToDlg (HWND hDlg, LPWSTR szSitePath);
  206. VOID InitializeSitesInfo (HWND hDlg);
  207. BOOL IsComputerRSoPEnabled(LPTSTR lpDCName);
  208. VOID InitializeDCInfo (HWND hDlg);
  209. VOID AddDefaultGroups (HWND hLB);
  210. VOID GetPrimaryGroup (HWND hLB, IDirectoryObject * pDSObj);
  211. HRESULT BuildMembershipList (HWND hLB, IDirectoryObject * pDSObj, SAFEARRAY ** psaSecGrp, DWORD ** pdwSecGrpAttr);
  212. HRESULT SaveSecurityGroups (HWND hLB, SAFEARRAY ** psaSecGrp, DWORD ** pdwSecGrpAttr);
  213. VOID FillListFromSafeArraySecurityGroup (HWND hLB, SAFEARRAY * psa, DWORD *psaSecGrpAttr);
  214. VOID FillListFromSafeArrays (HWND hLB, SAFEARRAY * psaNames, SAFEARRAY * psaData);
  215. HRESULT ExtractWQLFilters (LPTSTR lpNameSpace, SAFEARRAY **psaNamesArg, SAFEARRAY **psaDataArg);
  216. VOID BuildWQLFilterList (HWND hLB, BOOL bUser, SAFEARRAY **psaNames, SAFEARRAY **psaData);
  217. VOID SaveWQLFilters (HWND hLB, SAFEARRAY **psaNamesArg, SAFEARRAY **psaDataArg);
  218. BOOL CompareSafeArrays(SAFEARRAY *psa1, SAFEARRAY *psa2);
  219. LPTSTR GetDefaultSOM (LPTSTR lpDNName);
  220. LPTSTR GetDomainFromSOM (LPTSTR lpSOM);
  221. HRESULT TestSOM (LPTSTR lpSOM, HWND hDlg);
  222. HRESULT FillUserList (HWND hList, BOOL *bCurrentUserFound);
  223. void FillResultsList (HWND hLV);
  224. void InitializeResultsList (HWND hLV);
  225. BOOL TestAndValidateComputer(HWND hDlg);
  226. VOID EscapeString (LPTSTR *lpString);
  227. static INT CALLBACK DsBrowseCallback (HWND hwnd, UINT uMsg, LPARAM lParam, LPARAM lpData);
  228. void OnSecurity(HWND hDlg);
  229. void OnEdit(HWND hDlg);
  230. void OnContextMenu(HWND hDlg, LPARAM lParam);
  231. void OnRefreshDisplay(HWND hDlg);
  232. BOOL AddGPOListNode(LPTSTR lpGPOName, LPTSTR lpDSPath, LPTSTR lpSOM, LPTSTR lpFiltering,
  233. DWORD dwVersion, BOOL bFiltering, LPBYTE pSD, DWORD dwSDSize,
  234. LPGPOLISTITEM *lpList);
  235. VOID FreeGPOListData(LPGPOLISTITEM lpList);
  236. void BuildGPOList (LPGPOLISTITEM * lpList, LPTSTR lpNamespace);
  237. void BuildGPOLists (void);
  238. void PrepGPOList(HWND hList, BOOL bSOM, BOOL bFiltering,
  239. BOOL bVersion, DWORD dwCount);
  240. void FillGPOList(HWND hDlg, DWORD dwListID, LPGPOLISTITEM lpList,
  241. BOOL bSOM, BOOL bFiltering, BOOL bVersion, BOOL bInitial);
  242. void InitializeErrorsDialog(HWND hDlg, LPCSEITEM lpList);
  243. void OnSaveAs (HWND hDlg);
  244. void RefreshErrorInfo (HWND hDlg);
  245. BOOL AddCSENode(LPTSTR lpName, LPTSTR lpGUID, DWORD dwStatus,
  246. ULONG ulLoggingStatus, SYSTEMTIME *pBeginTime, SYSTEMTIME *pEndTime,
  247. LPCSEITEM *lpList, BOOL *bCSEError, BOOL *bGPCoreError, LPSOURCEENTRY lpSources);
  248. VOID FreeCSEData(LPCSEITEM lpList);
  249. void QueryRSoPPolicySettingStatusInstances (LPTSTR lpNamespace);
  250. void GetEventLogSources (IWbemServices * pNamespace,
  251. LPTSTR lpCSEGUID, LPTSTR lpComputerName,
  252. SYSTEMTIME *BeginTime, SYSTEMTIME *EndTime,
  253. LPSOURCEENTRY *lpSources);
  254. void BuildCSEList (LPCSEITEM * lpList, LPTSTR lpNamespace, BOOL *bCSEError, BOOL *bGPCoreError);
  255. VOID BuildCSELists (void);
  256. LPTSTR GetUserSOM() { return m_szUserSOM; };
  257. LPTSTR GetComputerSOM() {return m_szComputerSOM; };
  258. LPTSTR GetUserName() { return m_szUserName; };
  259. LPTSTR GetComputerName() {return m_szComputerName; };
  260. HRESULT SetupFonts();
  261. HFONT m_BigBoldFont;
  262. HFONT m_BoldFont;
  263. private:
  264. void SetDirty(VOID) { m_bDirty = TRUE; }
  265. void ClearDirty(VOID) { m_bDirty = FALSE; }
  266. BOOL ThisIsDirty(VOID) { return m_bDirty; }
  267. HRESULT DeleteRSOPData(LPTSTR lpNameSpace);
  268. HRESULT GenerateRSOPDataEx(HWND hDlg, LPTSTR *lpNameSpace);
  269. HRESULT GenerateRSOPData(HWND hDlg, LPTSTR *lpNameSpace, BOOL bSkipCSEs, BOOL bLimitData, BOOL bUser, BOOL bForceCreate, ULONG *pulErrorInfo);
  270. HRESULT InitializeRSOP(HWND hDlg);
  271. HRESULT InitializeRSOPFromMSC(DWORD dwFlags);
  272. HRESULT IsNode (LPDATAOBJECT lpDataObject, MMC_COOKIE cookie);
  273. HRESULT IsSnapInManager (LPDATAOBJECT lpDataObject);
  274. HRESULT EnumerateScopePane (LPDATAOBJECT lpDataObject, HSCOPEITEM hParent);
  275. HRESULT SetupPropertyPages(DWORD dwFlags, LPPROPERTYSHEETCALLBACK lpProvider,
  276. LONG_PTR handle, LPDATAOBJECT lpDataObject);
  277. static INT_PTR CALLBACK RSOPWelcomeDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
  278. static INT_PTR CALLBACK RSOPChooseModeDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
  279. static INT_PTR CALLBACK RSOPGetCompDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
  280. static INT_PTR CALLBACK RSOPGetUserDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
  281. static INT_PTR CALLBACK RSOPGetTargetDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
  282. static INT_PTR CALLBACK RSOPGetDCDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
  283. static INT_PTR CALLBACK RSOPAltDirsDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
  284. static INT_PTR CALLBACK RSOPAltUserSecDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
  285. static INT_PTR CALLBACK RSOPAltCompSecDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
  286. static INT_PTR CALLBACK RSOPWQLUserDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
  287. static INT_PTR CALLBACK RSOPWQLCompDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
  288. static INT_PTR CALLBACK RSOPFinishedDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
  289. static INT_PTR CALLBACK RSOPFinished2DlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
  290. static INT_PTR CALLBACK RSOPChooseDCDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
  291. static INT_PTR CALLBACK RSOPGPOListMachineProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
  292. static INT_PTR CALLBACK RSOPGPOListUserProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
  293. static INT_PTR CALLBACK RSOPErrorsMachineProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
  294. static INT_PTR CALLBACK RSOPErrorsUserProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
  295. static INT_PTR CALLBACK QueryDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
  296. static INT_PTR CALLBACK BrowseDCDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
  297. static INT_PTR CALLBACK InitRsopDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
  298. static HRESULT WINAPI ReadSecurityDescriptor (LPCWSTR lpGPOPath, SECURITY_INFORMATION si, PSECURITY_DESCRIPTOR *pSD, LPARAM lpContext);
  299. static HRESULT WINAPI WriteSecurityDescriptor (LPCWSTR lpGPOPath, SECURITY_INFORMATION si, PSECURITY_DESCRIPTOR pSD, LPARAM lpContext);
  300. };
  301. //
  302. // class factory
  303. //
  304. class CRSOPComponentDataCF : public IClassFactory
  305. {
  306. protected:
  307. ULONG m_cRef;
  308. public:
  309. CRSOPComponentDataCF();
  310. ~CRSOPComponentDataCF();
  311. // IUnknown methods
  312. STDMETHODIMP QueryInterface(REFIID, LPVOID FAR *);
  313. STDMETHODIMP_(ULONG) AddRef();
  314. STDMETHODIMP_(ULONG) Release();
  315. // IClassFactory methods
  316. STDMETHODIMP CreateInstance(LPUNKNOWN, REFIID, LPVOID FAR *);
  317. STDMETHODIMP LockServer(BOOL);
  318. };
  319. //
  320. // IWbemObjectSink implementation
  321. //
  322. class CCreateSessionSink : public IWbemObjectSink
  323. {
  324. protected:
  325. ULONG m_cRef;
  326. HWND m_hProgress;
  327. DWORD m_dwThread;
  328. HRESULT m_hrSuccess;
  329. BSTR m_pNameSpace;
  330. ULONG m_ulErrorInfo;
  331. BOOL m_bSendQuitMessage;
  332. public:
  333. CCreateSessionSink(HWND hProgress, DWORD dwThread);
  334. ~CCreateSessionSink();
  335. STDMETHODIMP SendQuitMessage (BOOL bSendQuitMessage);
  336. STDMETHODIMP GetResult (HRESULT *hSuccess);
  337. STDMETHODIMP GetNamespace (BSTR *pNamespace);
  338. STDMETHODIMP GetErrorInfo (ULONG *pulErrorInfo);
  339. // IUnknown methods
  340. STDMETHODIMP QueryInterface(REFIID, LPVOID FAR *);
  341. STDMETHODIMP_(ULONG) AddRef();
  342. STDMETHODIMP_(ULONG) Release();
  343. // IWbemObjectSink methods
  344. STDMETHODIMP Indicate(LONG lObjectCount, IWbemClassObject **apObjArray);
  345. STDMETHODIMP SetStatus(LONG lFlags, HRESULT hResult, BSTR strParam, IWbemClassObject *pObjParam);
  346. };
  347. //
  348. // AboutGPE class factory
  349. //
  350. class CRSOPCMenuCF : public IClassFactory
  351. {
  352. protected:
  353. LONG m_cRef;
  354. public:
  355. CRSOPCMenuCF();
  356. ~CRSOPCMenuCF();
  357. // IUnknown methods
  358. STDMETHODIMP QueryInterface(REFIID, LPVOID FAR *);
  359. STDMETHODIMP_(ULONG) AddRef();
  360. STDMETHODIMP_(ULONG) Release();
  361. // IClassFactory methods
  362. STDMETHODIMP CreateInstance(LPUNKNOWN, REFIID, LPVOID FAR *);
  363. STDMETHODIMP LockServer(BOOL);
  364. };
  365. #define RSOP_LAUNCH_PLANNING 1
  366. #define RSOP_LAUNCH_LOGGING 2
  367. //
  368. // Group Policy Hint types
  369. //
  370. typedef enum _RSOP_POLICY_HINT_TYPE {
  371. RSOPHintUnknown = 0, // No link information available
  372. RSOPHintMachine, // a machine
  373. RSOPHintUser, // a user
  374. RSOPHintSite, // a site
  375. RSOPHintDomain, // a domain
  376. RSOPHintOrganizationalUnit, // a organizational unit
  377. } RSOP_POLICY_HINT_TYPE, *PRSOP_POLICY_HINT_TYPE;
  378. class CRSOPCMenu : public IExtendContextMenu
  379. {
  380. protected:
  381. LONG m_cRef;
  382. LPWSTR m_lpDSObject;
  383. LPWSTR m_szDomain;
  384. LPWSTR m_szDN;
  385. RSOP_POLICY_HINT_TYPE m_rsopHint;
  386. static unsigned int m_cfDSObjectName;
  387. public:
  388. CRSOPCMenu();
  389. ~CRSOPCMenu();
  390. // IUnknown methods
  391. STDMETHODIMP QueryInterface(REFIID, LPVOID FAR *);
  392. STDMETHODIMP_(ULONG) AddRef();
  393. STDMETHODIMP_(ULONG) Release();
  394. // IExtencContextMenu methods
  395. STDMETHODIMP AddMenuItems(LPDATAOBJECT piDataObject,
  396. LPCONTEXTMENUCALLBACK piCallback,
  397. long * pInsertionAllowed);
  398. STDMETHODIMP Command(long lCommandID, LPDATAOBJECT piDataObject);
  399. };
  400. //
  401. // Save console defines
  402. //
  403. #define RSOP_PERSIST_DATA_VERSION 5 // version number in msc file
  404. #define MSC_RSOP_FLAG_DIAGNOSTIC 0x00000001 // Diagnostic mode vs planning mode
  405. #define MSC_RSOP_FLAG_ARCHIVEDATA 0x00000002 // RSoP data is archived also
  406. #define MSC_RSOP_FLAG_SLOWLINK 0x00000004 // Slow link simulation in planning mode
  407. #define MSC_RSOP_FLAG_NOUSER 0x00000008 // Do not display user data
  408. #define MSC_RSOP_FLAG_NOCOMPUTER 0x00000010 // Do not display computer data
  409. #define MSC_RSOP_FLAG_LOOPBACK_REPLACE 0x00000020 // Simulate loopback replace mode.
  410. #define MSC_RSOP_FLAG_LOOPBACK_MERGE 0x00000040 // Simulate loopback merge mode.
  411. #define MSC_RSOP_FLAG_USERDENIED 0x00000080 // User denied access
  412. #define MSC_RSOP_FLAG_COMPUTERDENIED 0x00000100 // Computer denied access
  413. //
  414. // RSOP Command line switches
  415. //
  416. #define RSOP_CMD_LINE_START TEXT("/Rsop") // base to all group policy command line switches
  417. #define RSOP_MODE TEXT("/RsopMode:") // Rsop Mode Planning/Logging 0 is logging, 1 is planning
  418. #define RSOP_USER_OU_PREF TEXT("/RsopUserOu:") // Rsop User OU preference
  419. #define RSOP_COMP_OU_PREF TEXT("/RsopCompOu:") // Rsop Comp OU Preference
  420. #define RSOP_USER_NAME TEXT("/RsopUser:") // Rsop User Name
  421. #define RSOP_COMP_NAME TEXT("/RsopComp:") // Rsop Comp Name
  422. #define RSOP_SITENAME TEXT("/RsopSite:") // Rsop Site Name
  423. #define RSOP_DCNAME_PREF TEXT("/RsopDc:") // DC Name that the tool should connect to
  424. //
  425. // Various flags to decide which prop sheets to show
  426. //
  427. #define RSOP_NOMSC 1
  428. #define RSOPMSC_OVERRIDE 2
  429. #define RSOPMSC_NOOVERRIDE 4