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.

443 lines
8.7 KiB

  1. //Copyright (c) 1998 - 1999 Microsoft Corporation
  2. #ifndef _TSPRSHT_H
  3. #define _TSPRSHT_H
  4. #include"baspdlg.h"
  5. #include"todlg.h"
  6. #include<mmc.h>
  7. #include"rnodes.h"
  8. // #include<objsel.h>
  9. #include<commctrl.h>
  10. // #include<winsta.h>
  11. #include<aclui.h>
  12. #include "asyncdlg.h"
  13. #define NUM_OF_PRSHT 8
  14. class CPropsheet
  15. {
  16. int m_cref;
  17. LONG_PTR m_hNotify;
  18. CDialogPropBase *m_pDlg[ NUM_OF_PRSHT ];
  19. BOOL m_bGotUC;
  20. PUSERCONFIG m_puc;
  21. HWND m_hMMCWindow;
  22. public:
  23. CPropsheet( );
  24. int AddRef( );
  25. int Release( );
  26. HRESULT InitDialogs( HWND , LPPROPERTYSHEETCALLBACK , CResultNode * , LONG_PTR );
  27. HRESULT SetUserConfig( USERCONFIG& , PDWORD );
  28. BOOL ExcludeMachinePolicySettings(USERCONFIG& uc);
  29. BOOL GetUserConfig( BOOLEAN bPerformMerger );
  30. BOOL GetCurrentUserConfig( USERCONFIG&, BOOLEAN bPerformMerger );
  31. CResultNode *m_pResNode;
  32. void PreDestruct( );
  33. BOOL m_bPropertiesChange;
  34. };
  35. HPROPSHEETPAGE GetSecurityPropertyPage( CPropsheet * );
  36. //-----------------------------------------------------------------------------
  37. class CGeneral : public CDialogPropBase
  38. {
  39. CPropsheet *m_pParent;
  40. Encryption *m_pEncrypt;
  41. DWORD m_DefaultEncryptionLevelIndex;
  42. INT_PTR m_nOldSel;
  43. public:
  44. CGeneral( CPropsheet * );
  45. BOOL OnInitDialog( HWND , WPARAM , LPARAM );
  46. static INT_PTR CALLBACK DlgProc( HWND , UINT , WPARAM , LPARAM );
  47. BOOL GetPropertySheetPage( PROPSHEETPAGE& );
  48. BOOL OnDestroy( );
  49. BOOL OnCommand( WORD , WORD , HWND );
  50. BOOL PersistSettings( HWND );
  51. };
  52. //-----------------------------------------------------------------------------
  53. class CLogonSetting : public CDialogPropBase
  54. {
  55. CPropsheet *m_pParent;
  56. WORD m_wOldId;
  57. public:
  58. CLogonSetting( CPropsheet * );
  59. BOOL OnInitDialog( HWND , WPARAM , LPARAM );
  60. static INT_PTR CALLBACK DlgProc( HWND , UINT , WPARAM , LPARAM );
  61. BOOL GetPropertySheetPage( PROPSHEETPAGE& );
  62. BOOL OnDestroy( );
  63. BOOL OnCommand( WORD , WORD , HWND );
  64. BOOL PersistSettings( HWND );
  65. BOOL IsValidSettings( HWND );
  66. BOOL ConfirmPassWd( HWND );
  67. };
  68. //-----------------------------------------------------------------------------
  69. class CTimeSetting : public CDialogPropBase , public CTimeOutDlg
  70. {
  71. CPropsheet *m_pParent;
  72. WORD m_wOldAction;
  73. WORD m_wOldCon;
  74. BOOL m_bPrevClient;
  75. public:
  76. CTimeSetting( CPropsheet * );
  77. BOOL OnInitDialog( HWND , WPARAM , LPARAM );
  78. static INT_PTR CALLBACK DlgProc( HWND , UINT , WPARAM , LPARAM );
  79. BOOL GetPropertySheetPage( PROPSHEETPAGE& );
  80. BOOL OnDestroy( );
  81. BOOL OnCommand( WORD , WORD , HWND );
  82. int GetCBXSTATEindex( HWND );
  83. void SetTimeoutControls(HWND);
  84. void SetBkResetControls(HWND);
  85. void SetReconControls(HWND);
  86. //void xxxSetControls( HWND , BOOL , int );
  87. BOOL IsValidSettings( HWND );
  88. BOOL PersistSettings( HWND );
  89. };
  90. /*-----------------------------------------------------------------------------
  91. typedef struct _securedentry
  92. {
  93. PSID psid;
  94. ACCESS_MASK amAllowed;
  95. ACCESS_MASK amDenied;
  96. TCHAR tchDisplayName[ 260 ];
  97. TCHAR tchADSPath[ 260 ];
  98. TCHAR tchType[ 20 ];
  99. } SECUREDENTRY , * PSECUREDENTRY;
  100. //-----------------------------------------------------------------------------
  101. typedef struct _namedentry
  102. {
  103. TCHAR tchNamedEntry[ 260 ];
  104. DWORD dwAcepos;
  105. } NAMEDENTRY , * PNAMEDENTRY;
  106. //-----------------------------------------------------------------------------
  107. class CPerm : public CDialogPropBase
  108. {
  109. CPropsheet *m_pParent;
  110. HWND m_lvUserGroups;
  111. HWND m_clPerms;
  112. HIMAGELIST m_hImglist;
  113. int m_iLastSelectedItem;
  114. LPBYTE m_pNE; // named entry blob
  115. int m_nNE;
  116. public:
  117. CPerm( CPropsheet * );
  118. BOOL OnInitDialog( HWND , WPARAM , LPARAM );
  119. static INT_PTR CALLBACK DlgProc( HWND , UINT , WPARAM , LPARAM );
  120. BOOL GetPropertySheetPage( PROPSHEETPAGE& );
  121. BOOL OnDestroy( );
  122. BOOL OnCommand( WORD , WORD , HWND );
  123. BOOL AddGroupUser( HWND );
  124. BOOL InsertSelectedItemsInList( HWND , PDSSELECTIONLIST );
  125. BOOL InitPriviledges( );
  126. BOOL InitImageList( );
  127. int GetObjectTypeIcon( LPTSTR );
  128. BOOL InitSecurityDialog( );
  129. BOOL ConvertSDtoEntries( PSECURITY_DESCRIPTOR );
  130. BOOL ReleaseEntries( );
  131. BOOL SidToStr( PSID , LPTSTR );
  132. BOOL ItemDuplicate( PSID );
  133. BOOL OnNotify( int , LPNMHDR , HWND );
  134. BOOL GetMask( PDWORD , PDWORD );
  135. BOOL SetMask( DWORD , DWORD );
  136. BOOL PersistSettings( HWND );
  137. BOOL ConvertEntriesToSD( PSECURITY_DESCRIPTOR , PSECURITY_DESCRIPTOR * );
  138. BOOL RemoveGroupUser( HWND );
  139. BOOL RemoveNamedEntries( );
  140. BOOL AssembleNamedEntries( );
  141. BOOL FindNamedEntryAcePos( DWORD , PSECUREDENTRY );
  142. }; */
  143. //-----------------------------------------------------------------------------
  144. class CEnviro : public CDialogPropBase
  145. {
  146. CPropsheet *m_pParent;
  147. public:
  148. CEnviro( CPropsheet * );
  149. BOOL OnInitDialog( HWND , WPARAM , LPARAM );
  150. static INT_PTR CALLBACK DlgProc( HWND , UINT , WPARAM , LPARAM );
  151. BOOL GetPropertySheetPage( PROPSHEETPAGE& );
  152. BOOL OnDestroy( );
  153. BOOL OnCommand( WORD , WORD , HWND );
  154. void SetControls( HWND , BOOL );
  155. BOOL PersistSettings( HWND );
  156. };
  157. //-----------------------------------------------------------------------------
  158. class CRemote : public CDialogPropBase
  159. {
  160. CPropsheet *m_pParent;
  161. WORD m_wOldRadioID;
  162. WORD m_wOldSel;
  163. public:
  164. CRemote( CPropsheet * );
  165. BOOL OnInitDialog( HWND , WPARAM , LPARAM );
  166. static INT_PTR CALLBACK DlgProc( HWND , UINT , WPARAM , LPARAM );
  167. BOOL GetPropertySheetPage( PROPSHEETPAGE& );
  168. BOOL OnDestroy( );
  169. BOOL OnCommand( WORD , WORD , HWND );
  170. void SetControls( HWND , BOOL );
  171. BOOL PersistSettings( HWND );
  172. };
  173. //-----------------------------------------------------------------------------
  174. class CClient : public CDialogPropBase
  175. {
  176. public:
  177. CClient( CPropsheet * );
  178. BOOL OnInitDialog( HWND , WPARAM , LPARAM );
  179. static INT_PTR CALLBACK DlgProc( HWND , UINT , WPARAM , LPARAM );
  180. BOOL GetPropertySheetPage( PROPSHEETPAGE& );
  181. BOOL OnDestroy( );
  182. BOOL OnCommand( WORD , WORD , HWND );
  183. BOOL PersistSettings( HWND );
  184. private:
  185. void DetermineFieldEnabling(HWND hDlg);
  186. void SetColorDepthEntry( HWND );
  187. CPropsheet *m_pParent;
  188. INT_PTR m_nColorDepth;
  189. };
  190. //-----------------------------------------------------------------------------
  191. class CSecurityPage : public ISecurityInformation, public CComObjectRoot
  192. {
  193. DECLARE_NOT_AGGREGATABLE( CSecurityPage )
  194. BEGIN_COM_MAP( CSecurityPage )
  195. COM_INTERFACE_ENTRY(ISecurityInformation)
  196. END_COM_MAP()
  197. public:
  198. // *** ISecurityInformation methods ***
  199. STDMETHOD( GetObjectInformation )( PSI_OBJECT_INFO );
  200. STDMETHOD( GetSecurity )( SECURITY_INFORMATION , PSECURITY_DESCRIPTOR *, BOOL );
  201. STDMETHOD( SetSecurity )( SECURITY_INFORMATION , PSECURITY_DESCRIPTOR );
  202. STDMETHOD( GetAccessRights )( const GUID * , DWORD , PSI_ACCESS * , PULONG , PULONG );
  203. STDMETHOD( MapGeneric )( const GUID *, PUCHAR , ACCESS_MASK * );
  204. STDMETHOD( GetInheritTypes )( PSI_INHERIT_TYPE * , PULONG );
  205. STDMETHOD( PropertySheetPageCallback )( HWND , UINT , SI_PAGE_TYPE );
  206. void SetParent( CPropsheet * );
  207. private:
  208. TCHAR m_szPageName[ 80 ];
  209. CPropsheet * m_pParent;
  210. BOOLEAN m_WritablePermissionsTab;
  211. };
  212. //-----------------------------------------------------------------------------
  213. class CTransNetwork : public CDialogPropBase
  214. {
  215. CPropsheet *m_pParent;
  216. ULONG m_ulOldLanAdapter;
  217. WORD m_oldID;
  218. ULONG m_uMaxInstOld;
  219. BOOL m_RemoteAdminMode;
  220. public:
  221. CTransNetwork( CPropsheet * );
  222. BOOL OnInitDialog( HWND , WPARAM , LPARAM );
  223. static INT_PTR CALLBACK DlgProc( HWND , UINT , WPARAM , LPARAM );
  224. BOOL GetPropertySheetPage( PROPSHEETPAGE& );
  225. BOOL OnDestroy( );
  226. BOOL OnCommand( WORD , WORD , HWND );
  227. BOOL PersistSettings( HWND );
  228. BOOL IsValidSettings( HWND );
  229. };
  230. //-----------------------------------------------------------------------------
  231. class CTransAsync : public CAsyncDlg , public CDialogPropBase
  232. {
  233. CPropsheet *m_pParent;
  234. public:
  235. BOOL IsValidSettings(HWND);
  236. CTransAsync( CPropsheet * );
  237. BOOL OnInitDialog( HWND , WPARAM , LPARAM );
  238. static INT_PTR CALLBACK DlgProc( HWND , UINT , WPARAM , LPARAM );
  239. BOOL GetPropertySheetPage( PROPSHEETPAGE& );
  240. BOOL OnDestroy( );
  241. BOOL OnCommand( WORD , WORD , HWND );
  242. void SetControls( HWND , BOOL );
  243. BOOL PersistSettings( HWND );
  244. };
  245. BOOL InitStrings( );
  246. BOOL FreeStrings( );
  247. //-----------------------------------------------------------------------------
  248. #endif // _TSPRSHT_H