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.

115 lines
2.0 KiB

  1. /*++
  2. Copyright (c) 1999-2000 Microsoft Corporation
  3. Module Name:
  4. policy.h
  5. Abstract:
  6. Policy related function
  7. Author:
  8. HueiWang 5/2/2000
  9. --*/
  10. #ifndef __RDSPOLICY_H__
  11. #define __RDSPOLICY_H__
  12. #include <windows.h>
  13. #include <tchar.h>
  14. #include <regapi.h>
  15. #include <winsta.h>
  16. #include <wtsapi32.h>
  17. #include "helper.h"
  18. #include "RAssistance.h"
  19. //
  20. // Registry key location for Salem related policy
  21. //
  22. #ifndef __WIN9XBUILD__
  23. #define RDS_GROUPPOLICY_SUBTREE TS_POLICY_SUB_TREE
  24. #define RDS_MACHINEPOLICY_SUBTREE REG_CONTROL_GETHELP
  25. #define RDS_ALLOWGETHELP_VALUENAME POLICY_TS_REMDSK_ALLOWTOGETHELP
  26. #else
  27. //
  28. // TODO - for Legacy platform not including TS5, decide where this shoule be
  29. //
  30. //
  31. // REGAPI uses L"", can't build on Win9x so we redefine here...
  32. //
  33. #define RDS_GROUPPOLICY_SUBTREE _TEXT("Software\\Policies\\Microsoft\\Windows NT\\TerminalServices")
  34. #define RDS_MACHINEPOLICY_SUBTREE _TEXT("Software\\Microsoft\\Remote Desktop\\Policies")
  35. #define RDS_ALLOWGETHELP_VALUENAME _TEXT("fAllowToGetHelp")
  36. #endif
  37. #define OLD_REG_CONTROL_GETHELP REG_CONTROL_SALEM L"\\Policies"
  38. #define RDS_HELPENTRY_VALID_PERIOD _TEXT("ValidPeriod")
  39. #define POLICY_ENABLE 1
  40. #define POLICY_DISABLE 0
  41. #ifdef __cplusplus
  42. extern "C" {
  43. #endif
  44. BOOL
  45. IsHelpAllowedOnLocalMachine(
  46. IN ULONG ulSessionID
  47. );
  48. BOOL
  49. IsUserAllowToGetHelp(
  50. IN ULONG ulSessionId,
  51. IN LPCTSTR pszUserSid
  52. );
  53. DWORD
  54. GetUserRDSLevel(
  55. IN ULONG ulSessionId,
  56. OUT REMOTE_DESKTOP_SHARING_CLASS* pLevel
  57. );
  58. DWORD
  59. ConfigUserSessionRDSLevel(
  60. IN ULONG ulSessionId,
  61. IN REMOTE_DESKTOP_SHARING_CLASS level
  62. );
  63. DWORD
  64. EnableWorkstationTSConnection(
  65. IN BOOL bEnable,
  66. IN OUT DWORD* settings
  67. );
  68. DWORD
  69. GetPolicyAllowGetHelpSetting(
  70. HKEY hKey,
  71. LPCTSTR pszKeyName,
  72. LPCTSTR pszValueName,
  73. IN DWORD* value
  74. );
  75. HRESULT
  76. PolicyGetMaxTicketExpiry(
  77. LONG* value
  78. );
  79. #ifdef __cplusplus
  80. }
  81. #endif
  82. #endif