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.

136 lines
2.2 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. GetSystemRDSLevel(
  55. IN ULONG ulSessionId,
  56. OUT REMOTE_DESKTOP_SHARING_CLASS* pSharingLevel
  57. );
  58. DWORD
  59. GetUserRDSLevel(
  60. IN ULONG ulSessionId,
  61. OUT REMOTE_DESKTOP_SHARING_CLASS* pLevel
  62. );
  63. DWORD
  64. ConfigSystemGetHelp(
  65. IN BOOL bEnable
  66. );
  67. DWORD
  68. ConfigSystemRDSLevel(
  69. IN REMOTE_DESKTOP_SHARING_CLASS level
  70. );
  71. DWORD
  72. ConfigUserSessionRDSLevel(
  73. IN ULONG ulSessionId,
  74. IN REMOTE_DESKTOP_SHARING_CLASS level
  75. );
  76. DWORD
  77. EnableWorkstationTSConnection(
  78. IN BOOL bEnable,
  79. IN OUT DWORD* settings
  80. );
  81. DWORD
  82. GetPolicyAllowGetHelpSetting(
  83. HKEY hKey,
  84. LPCTSTR pszKeyName,
  85. LPCTSTR pszValueName,
  86. IN DWORD* value
  87. );
  88. //HRESULT
  89. //PolicyGetAllowUnSolicitedHelp(
  90. // BOOL* bAllow
  91. //);
  92. HRESULT
  93. PolicyGetMaxTicketExpiry(
  94. LONG* value
  95. );
  96. #ifdef __cplusplus
  97. }
  98. #endif
  99. #endif