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.

75 lines
3.8 KiB

  1. // --------------------------------------------------------------------------
  2. // Module Name: SystemSettings.h
  3. //
  4. // Copyright (c) 1999-2000, Microsoft Corporation
  5. //
  6. // A class to handle opening and reading/writing from the Winlogon key.
  7. //
  8. // History: 1999-09-09 vtan created
  9. // 1999-11-16 vtan separate file
  10. // 2000-02-01 vtan moved from Neptune to Whistler
  11. // --------------------------------------------------------------------------
  12. #ifndef _SystemSettings_
  13. #define _SystemSettings_
  14. // --------------------------------------------------------------------------
  15. // CSystemSettings
  16. //
  17. // Purpose: This class deals with system settings typically found in
  18. // HKLM\System or HKLM\Software
  19. //
  20. // History: 1999-09-09 vtan created
  21. // 2000-04-12 vtan consolidation for policy checking
  22. // --------------------------------------------------------------------------
  23. class CSystemSettings
  24. {
  25. public:
  26. static bool IsSafeMode (void);
  27. static bool IsSafeModeMinimal (void);
  28. static bool IsSafeModeNetwork (void);
  29. static bool IsNetwareActive (void);
  30. static bool IsWorkStationProduct (void);
  31. static bool IsDomainMember (void);
  32. static bool IsActiveConsoleSession (void);
  33. static bool IsTerminalServicesEnabled (void);
  34. static bool IsFriendlyUIActive (void);
  35. static bool IsMultipleUsersEnabled (void);
  36. static bool IsRemoteConnectionsEnabled (void);
  37. static bool IsRemoteConnectionPresent (void);
  38. static bool IsShutdownWithoutLogonAllowed (void);
  39. static bool IsUndockWithoutLogonAllowed (void);
  40. static bool IsForceFriendlyUI (void);
  41. static LONG GetUIHost (TCHAR *pszPath);
  42. static bool IsUIHostStatic (void);
  43. static bool EnableFriendlyUI (bool fEnable);
  44. static bool EnableMultipleUsers (bool fEnable);
  45. static bool EnableRemoteConnections (bool fEnable);
  46. static int GetLoggedOnUserCount (void);
  47. static NTSTATUS CheckDomainMembership (void);
  48. static DWORD WINAPI AdjustFUSCompatibilityServiceState (void *pV);
  49. private:
  50. static LONG GetEffectiveInteger (HKEY hKey, const TCHAR *pszKeyName, const TCHAR *pszPolicyKeyName, const TCHAR *pszValueName, int& iResult);
  51. static LONG GetEffectivePath (HKEY hKey, const TCHAR *pszKeyName, const TCHAR *pszPolicyKeyName, const TCHAR *pszValueName, TCHAR *pszPath);
  52. static bool IsProfessionalTerminalServer (void);
  53. static bool IsMicrosoftGINA (void);
  54. static bool IsSCMTerminalServicesDisabled (void);
  55. static const TCHAR s_szSafeModeKeyName[];
  56. static const TCHAR s_szSafeModeOptionValueName[];
  57. static const TCHAR s_szWinlogonKeyName[];
  58. static const TCHAR s_szSystemPolicyKeyName[];
  59. static const TCHAR s_szTerminalServerKeyName[];
  60. static const TCHAR s_szTerminalServerPolicyKeyName[];
  61. static const TCHAR s_szNetwareClientKeyName[];
  62. static const TCHAR s_szLogonTypeValueName[];
  63. static const TCHAR s_szBackgroundValueName[];
  64. static const TCHAR s_szMultipleUsersValueName[];
  65. static const TCHAR s_szDenyRemoteConnectionsValueName[];
  66. static int s_iIsSafeModeMinimal;
  67. static int s_iIsSafeModeNetwork;
  68. };
  69. #endif /* _SystemSettings_ */