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.

121 lines
3.6 KiB

  1. //+--------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1996-1998
  5. //
  6. // File: lscommon.h
  7. //
  8. // Contents:
  9. //
  10. // History:
  11. //
  12. //---------------------------------------------------------------------------
  13. #ifndef __LSCOMMON_H__
  14. #define __LSCOMMON_H__
  15. //
  16. // Setup related
  17. //
  18. #define SZAPPNAME "lserver"
  19. #define SZSERVICENAME "TermServLicensing"
  20. #define SZSERVICEDISPLAYNAME "Terminal Server Licensing"
  21. #define LSERVER_DEFAULT_DBDIR "lserver"
  22. #define SZDEPENDENCIES "RPCSS\0\0"
  23. #define SZACCESSDRIVERNAME "Microsoft Access Driver (*.mdb)"
  24. #define LSERVER_LSA_PASSWORD_KEYNAME _TEXT("TermServLiceningPwd-12d4b7c8-77d5-11d1-8c24-00c04fa3080d")
  25. #define LSERVER_LSA_LASTRUN _TEXT("TermServLicensingStatus-12d4b7c8-77d5-11d1-8c24-00c04fa3080d")
  26. #define LSERVER_LSA_SETUPID _TEXT("TermServLicensingSetupId-12d4b7c8-77d5-11d1-8c24-00c04fa3080d")
  27. //
  28. // Keep this here for License Server OC setup.
  29. //
  30. #define LSERVER_LSA_STRUCT_VERSION 0x00010000 // version 1.0
  31. typedef struct {
  32. DWORD dwVersion;
  33. DWORD dwMaxKeyPackId;
  34. DWORD dwMaxLicenseId;
  35. } TLServerLastRunState, *LPTLServerLastRunState;
  36. #define LSERVER_LSA_LASTRUN_VER_CURRENT LSERVER_LSA_STRUCT_VERSION20
  37. typedef struct {
  38. DWORD dwVersion;
  39. DWORD dwMaxKeyPackId;
  40. DWORD dwMaxLicenseId;
  41. FILETIME ftLastShutdownTime;
  42. } TLServerLastRun, *LPTLServerLastRun;
  43. #define LSERVER_LSA_STRUCT_VERSION20 0x00020000
  44. #define LSERVER_DEFAULT_DBPATH _TEXT("%SYSTEMROOT%\\SYSTEM32\\LSERVER\\")
  45. #define LSERVER_DEFAULT_USER _TEXT("sa")
  46. #define LSERVER_DEFAULT_PWD _TEXT("password")
  47. #define LSERVER_DEFAULT_EDB _TEXT("TLSLic.edb")
  48. #define LSERVER_DEFAULT_EMPTYEDB _TEXT("Empty.edb")
  49. //-----------------------------------------------------------------------------
  50. //
  51. // TODO - client need to define this
  52. //
  53. #define LSERVER_DISCOVERY_PARAMETER_KEY "Software\\Microsoft\\MSLicensing\\Parameters"
  54. #define LSERVER_LOOKUP_TIMEOUT "TimeOut"
  55. #define LSERVER_LOOKUP_DEFAULT_TIMEOUT 1*1000 // default to 1 second timeout
  56. //-----------------------------------------------------------------------------
  57. //
  58. // RPC
  59. //
  60. #define RPC_ENTRYNAME "/.:/HydraLSFrontEnd"
  61. #define RPC_PROTOSEQTCP "ncacn_ip_tcp"
  62. #define RPC_PROTOSEQLPC "ncalrpc"
  63. #define RPC_PROTOSEQNP "ncacn_np"
  64. #define HLSPIPENAME "HydraLsPipe"
  65. #define LSNAMEPIPE "\\pipe\\HydraLsPipe"
  66. #define SERVERMAILSLOTNAME "HydraLsServer"
  67. #define CLIENTMAILSLOTNAME "HydraLsClient"
  68. #define MAX_MAILSLOT_MSG_SIZE MAX_COMPUTERNAME_LENGTH+_MAX_PATH+80
  69. //
  70. // Currently supported mailslot protocol
  71. //
  72. #define LSERVER_DISCOVERY "DISC"
  73. #define LSERVER_CHALLENGE "CHAL"
  74. #define LSERVER_OPEN_BLK '<'
  75. #define LSERVER_CLOSE_BLK '>'
  76. // -------------------------------------------------------------------------------
  77. //
  78. // Current database version
  79. //
  80. //
  81. #define W2K_BETA3_JETBLUE_DBVERSION 0x00000001
  82. #define W2K_RTM_JETBLUE_DBVERSION 0x00000002
  83. #define ENFORCE_JETBLUE_DBVERSION 0x80000000
  84. #ifdef ENFORCE_LICENSING
  85. #define TLS_BETA_DBVERSION ENFORCE_JETBLUE_DBVERSION | W2K_BETA3_JETBLUE_DBVERSION
  86. #define TLS_CURRENT_DBVERSION ENFORCE_JETBLUE_DBVERSION | W2K_RTM_JETBLUE_DBVERSION
  87. #else
  88. #define TLS_BETA_DBVERSION W2K_BETA3_JETBLUE_DBVERSION
  89. #define TLS_CURRENT_DBVERSION W2K_RTM_JETBLUE_DBVERSION
  90. #endif
  91. #define IS_ENFORCE_VERSION(x) (x & 0x80000000)
  92. #define DATABASE_VERSION(x) (x & 0x7FFFFFFF)
  93. #endif