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.

266 lines
7.4 KiB

  1. //Copyright (c) 1998 - 1999 Microsoft Corporation
  2. /*******************************************************************************
  3. *
  4. * wincfg.h
  5. *
  6. * WinStation Configuration application: main header file
  7. *
  8. * copyright notice: Copyright 1996, Citrix Systems Inc.
  9. *
  10. * $Author: donm $ Butch Davis
  11. *
  12. * $Log: N:\nt\private\utils\citrix\winutils\tscfg\VCS\wincfg.h $
  13. *
  14. * Rev 1.23 18 Apr 1998 15:32:12 donm
  15. * Added capability bits
  16. *
  17. * Rev 1.22 13 Jan 1998 14:08:42 donm
  18. * gets encryption levels from extension DLL
  19. *
  20. * Rev 1.21 10 Dec 1997 15:59:32 donm
  21. * added ability to have extension DLLs
  22. *
  23. * Rev 1.20 27 Jun 1997 15:58:46 butchd
  24. * Registry changes for Wds/Tds/Pds/Cds
  25. *
  26. * Rev 1.19 19 Jun 1997 19:22:30 kurtp
  27. * update
  28. *
  29. * Rev 1.18 25 Mar 1997 09:00:48 butchd
  30. * update
  31. *
  32. * Rev 1.17 04 Mar 1997 08:35:30 butchd
  33. * update
  34. *
  35. * Rev 1.16 27 Sep 1996 17:52:48 butchd
  36. * update
  37. *
  38. *******************************************************************************/
  39. #ifndef __AFXWIN_H__
  40. #error include 'stdafx.h' before including this file for PCH
  41. #endif
  42. /*
  43. * WINUTILS common helper function include files
  44. */
  45. #include "common.h"
  46. #include "..\..\inc\utilsub.h"
  47. #include <utildll.h>
  48. #include "tscfgext.h"
  49. /*
  50. * pre-object include files
  51. */
  52. #include "defines.h"
  53. // define class here so that CWinStationListObject can have
  54. // a pointer to a CWdListObject
  55. class CWdListObject;
  56. ////////////////////////////////////////////////////////////////////////////////
  57. // CWinStationListObject class
  58. //
  59. class CWinStationListObject : public CObject
  60. {
  61. /*
  62. * Member variables
  63. */
  64. public:
  65. CWinStationListObject();
  66. ~CWinStationListObject();
  67. WINSTATIONNAME m_WinStationName; // Registry WinStations SubKey
  68. PDNAME m_PdName; // Pd Name (of Pd 0)
  69. SDCLASS m_SdClass; // Pd Class (of Pd 0)
  70. WDNAME m_WdName; // Wd Name
  71. TCHAR m_Comment[WINSTATIONCOMMENT_LENGTH+1]; // WinStation comment
  72. TCHAR m_DeviceName[DEVICENAME_LENGTH+MODEMNAME_LENGTH+1]; // Decorated Device Name for Async display
  73. ULONG m_Flags; // Various flags
  74. ULONG m_LanAdapter; // LanAdapter # (for PdNetwork)
  75. void *m_pExtObject; // Additional info kept by extension DLL
  76. CWdListObject *m_pWdListObject;
  77. }; // end CWinStationListObject class interface
  78. typedef CWinStationListObject WSLOBJECT;
  79. typedef CWinStationListObject * PWSLOBJECT;
  80. /*
  81. * CWinStationListObject flags
  82. */
  83. #define WSL_ENABLED 0x00000001 // WinStation enabled or disabled
  84. #define WSL_DIRECT_ASYNC 0x00000002 // Direct connection (for PdAsync)
  85. #define WSL_MUST_REBOOT 0x00000004 // System needs reboot before WinStation active.
  86. #define WSL_SINGLE_INST 0x00000008 // Single-instance (PdConfig2->PdFlag & PD_SINGLE_INST)
  87. ////////////////////////////////////////////////////////////////////////////////
  88. const int ExDlgModeNew = 0;
  89. const int ExDlgModeEdit = 1;
  90. typedef struct _EncLevel {
  91. WORD StringID;
  92. DWORD RegistryValue;
  93. WORD Flags;
  94. } EncryptionLevel;
  95. // Flags for EncryptionLevel.Flags
  96. const WORD ELF_DEFAULT = 0x0001; // This is the default value
  97. typedef void* PEXTOBJECT;
  98. typedef void (WINAPI *LPFNEXTSTARTPROC) (WDNAME *pWdName);
  99. typedef void (WINAPI *LPFNEXTENDPROC) (void);
  100. typedef void (WINAPI *LPFNEXTDIALOGPROC) (HWND, PEXTOBJECT);
  101. typedef void (WINAPI *LPFNEXTDELETEOBJECTPROC) (PEXTOBJECT);
  102. typedef PEXTOBJECT (WINAPI *LPFNEXTDUPOBJECTPROC) (PEXTOBJECT);
  103. typedef PEXTOBJECT (WINAPI *LPFNEXTREGQUERYPROC) (PWINSTATIONNAME, PPDCONFIG);
  104. typedef LONG (WINAPI *LPFNEXTREGCREATEPROC) (PWINSTATIONNAME, PEXTOBJECT, BOOLEAN);
  105. typedef LONG (WINAPI *LPFNEXTREGDELETEPROC) (PWINSTATIONNAME, PEXTOBJECT);
  106. typedef BOOL (WINAPI *LPFNEXTCOMPAREOBJECTSPROC) (PEXTOBJECT, PEXTOBJECT);
  107. typedef LONG (WINAPI *LPFNEXTENCRYPTIONLEVELSPROC) (WDNAME *pWdName, EncryptionLevel **);
  108. typedef ULONG (WINAPI *LPFNEXTGETCAPABILITIES) (void);
  109. ////////////////////////////////////////////////////////////////////////////////
  110. // CWdListObject class
  111. //
  112. class CWdListObject : public CObject
  113. {
  114. /*
  115. * Member variables
  116. */
  117. public:
  118. WDCONFIG2 m_WdConfig;
  119. HINSTANCE m_hExtensionDLL;
  120. ULONG m_Capabilities;
  121. LPFNEXTSTARTPROC m_lpfnExtStart;
  122. LPFNEXTENDPROC m_lpfnExtEnd;
  123. LPFNEXTDIALOGPROC m_lpfnExtDialog;
  124. LPFNEXTDELETEOBJECTPROC m_lpfnExtDeleteObject;
  125. LPFNEXTDUPOBJECTPROC m_lpfnExtDupObject;
  126. LPFNEXTREGQUERYPROC m_lpfnExtRegQuery;
  127. LPFNEXTREGCREATEPROC m_lpfnExtRegCreate;
  128. LPFNEXTREGDELETEPROC m_lpfnExtRegDelete;
  129. LPFNEXTCOMPAREOBJECTSPROC m_lpfnExtCompareObjects;
  130. LPFNEXTENCRYPTIONLEVELSPROC m_lpfnExtEncryptionLevels;
  131. LPFNEXTGETCAPABILITIES m_lpfnExtGetCapabilities;
  132. }; // end CWdListObject class interface
  133. typedef CWdListObject TERMLOBJECT;
  134. typedef CWdListObject * PTERMLOBJECT;
  135. ////////////////////////////////////////////////////////////////////////////////
  136. ////////////////////////////////////////////////////////////////////////////////
  137. // CPdListObject class
  138. //
  139. class CPdListObject : public CObject
  140. {
  141. /*
  142. * Member variables
  143. */
  144. public:
  145. PDCONFIG3 m_PdConfig;
  146. }; // end CPdListObject class interface
  147. typedef CPdListObject PDLOBJECT;
  148. typedef CPdListObject * PPDLOBJECT;
  149. ////////////////////////////////////////////////////////////////////////////////
  150. /*
  151. * post-object include files
  152. */
  153. #include "resource.h"
  154. #include "threads.h"
  155. #include "dialogs.h"
  156. #include "helpers.h"
  157. ////////////////////////////////////////////////////////////////////////////////
  158. // CWincfgApp class
  159. //
  160. class CWincfgApp : public CWinApp
  161. {
  162. /*
  163. * Member variables.
  164. */
  165. public:
  166. CObList m_WdList;
  167. CObList m_TdListList;
  168. CObList m_PdListList;
  169. CFont m_font;
  170. TCHAR m_szSystemConsole[WINSTATIONNAME_LENGTH+1];
  171. TCHAR m_szLocalAppServer[MAX_COMPUTERNAME_LENGTH+3];
  172. TCHAR m_szCurrentAppServer[MAX_COMPUTERNAME_LENGTH+3];
  173. TCHAR m_CurrentUserName[USERNAME_LENGTH];
  174. WINSTATIONNAME m_CurrentWinStation;
  175. ULONG m_CurrentLogonId;
  176. ULONG m_CurrentWSFlags;
  177. WINDOWPLACEMENT m_Placement;
  178. int m_nConfirmation;
  179. int m_nHexBase;
  180. int m_nRegistryOnly;
  181. BOOL m_bAllowHelp;
  182. LPCTSTR m_pszRegWinStationCreate;
  183. LPCTSTR m_pszRegWinStationSetSecurity;
  184. LPCTSTR m_pszRegWinStationQuery;
  185. LPCTSTR m_pszRegWinStationDelete;
  186. LPCTSTR m_pszGetDefaultWinStationSecurity;
  187. LPCTSTR m_pszGetWinStationSecurity;
  188. protected:
  189. LOGFONT m_lfDefFont;
  190. int m_nSaveSettingsOnExit;
  191. /*
  192. * Implementation
  193. */
  194. public:
  195. CWincfgApp();
  196. /*
  197. * Overrides of MFC CWinApp class
  198. */
  199. public:
  200. BOOL InitInstance();
  201. void AddToRecentFileList( const char * pszPathName );
  202. /*
  203. * Operations
  204. */
  205. protected:
  206. BOOL Initialize();
  207. void GetAppProfileInfo();
  208. public:
  209. void Terminate();
  210. protected:
  211. void SetAppProfileInfo();
  212. /*
  213. * Message map / commands
  214. */
  215. protected:
  216. //{{AFX_MSG(CWincfgApp)
  217. afx_msg void OnAppAbout();
  218. afx_msg void OnOptionsFont();
  219. afx_msg void OnOptionsConfirmation();
  220. afx_msg void OnUpdateOptionsConfirmation(CCmdUI* pCmdUI);
  221. afx_msg void OnOptionsSaveSettingsOnExit();
  222. afx_msg void OnUpdateOptionsSaveSettingsOnExit(CCmdUI* pCmdUI);
  223. afx_msg void OnHelpSearchFor();
  224. afx_msg void OnHelp();
  225. //}}AFX_MSG
  226. DECLARE_MESSAGE_MAP()
  227. }; // end CWincfgApp class interface
  228. ////////////////////////////////////////////////////////////////////////////////