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.

146 lines
3.3 KiB

  1. //+--------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1996-1998
  5. //
  6. // File: globals.h
  7. //
  8. // Contents: All global variable used in Hydra License Server
  9. //
  10. // History: 12-09-97 HueiWang Created
  11. //
  12. //---------------------------------------------------------------------------
  13. #ifndef __LS_GLOBALS_H
  14. #define __LS_GLOBALS_H
  15. #include "server.h"
  16. #include "vss.h"
  17. #include "vswriter.h"
  18. #include "jetwriter.h"
  19. #ifndef INITGUID
  20. #define INITGUID
  21. #include <guiddef.h>
  22. #undef INITGUID
  23. #else
  24. #include <guiddef.h>
  25. #endif
  26. //---------------------------------------------------------------------------
  27. // All globals variable are declared in globals.cpp
  28. //
  29. #ifndef _NO_ODBC_JET
  30. extern TLSDbWorkSpace* g_DbWorkSpace;
  31. #endif
  32. // Defaule server scope
  33. extern CVssJetWriter *g_pWriter;
  34. extern GUID idWriter;
  35. extern TCHAR g_szScope[LSERVER_MAX_STRING_SIZE+1];
  36. extern LPTSTR g_pszScope;
  37. extern TCHAR g_szDatabaseFile[MAX_PATH+1];
  38. extern TCHAR g_szDatabaseDir[MAX_PATH+1];
  39. extern TCHAR g_szDatabaseFname[MAX_PATH+1];
  40. extern TCHAR g_szDbUser[MAXUSERNAMELENGTH+1];
  41. extern TCHAR g_szDbPwd[MAXUSERNAMELENGTH+1];
  42. extern LPCTSTR szManufactureMS;
  43. extern LONG g_NextKeyPackId;
  44. extern LONG g_NextLicenseId;
  45. extern PBYTE g_pbSecretKey;
  46. extern DWORD g_cbSecretKey;
  47. extern LPTSTR g_pszServerUniqueId;
  48. extern DWORD g_cbServerUniqueId;
  49. extern LPTSTR g_pszServerPid;
  50. extern DWORD g_cbServerPid;
  51. extern PBYTE g_pbServerSPK;
  52. extern DWORD g_cbServerSPK;
  53. extern DWORD g_GracePeriod;
  54. extern BOOL g_IssueTemporayLicense;
  55. extern BOOL g_bHasHydraCert;
  56. extern PBYTE g_pbSignatureEncodedCert;
  57. extern DWORD g_cbSignatureEncodedCert;
  58. extern PBYTE g_pbExchangeEncodedCert;
  59. extern DWORD g_cbExchangeEncodedCert;
  60. extern TCHAR g_szHostName[MAXTCPNAME+1];
  61. extern DWORD g_cbHostName;
  62. extern TCHAR g_szComputerName[MAX_COMPUTERNAME_LENGTH+2];
  63. extern DWORD g_cbComputerName;
  64. extern PCCERT_CONTEXT g_LicenseCertContext;
  65. extern HCRYPTPROV g_hCryptProv;
  66. extern PCCERT_CONTEXT g_SelfSignCertContext;
  67. extern DWORD g_GeneralDbTimeout;
  68. extern DWORD g_EnumDbTimeout;
  69. extern DWORD g_dwMaxDbHandles;
  70. #if ENFORCE_LICENSING
  71. extern HCERTSTORE g_hCaStore;
  72. extern HKEY g_hCaRegKey;
  73. #endif
  74. extern HCRYPTKEY g_SignKey;
  75. extern HCRYPTKEY g_ExchKey;
  76. //extern PBYTE g_pbDomainSid;
  77. //extern DWORD g_cbDomainSid;
  78. extern DWORD g_SrvRole;
  79. extern LPTSTR g_szDomainGuid;
  80. extern PCERT_EXTENSIONS g_pCertExtensions;
  81. extern DWORD g_cbCertExtensions;
  82. extern FILETIME g_ftCertExpiredTime;
  83. extern FILETIME g_ftLastShutdownTime;
  84. extern DWORD g_dwTlsJobInterval;
  85. extern DWORD g_dwTlsJobRetryTimes;
  86. extern DWORD g_dwTlsJobRestartTime;
  87. extern SERVER_ROLE_IN_DOMAIN g_ServerRoleInDomain;
  88. extern DWORD g_LowLicenseCountWarning;
  89. extern DWORD g_EsentMaxCacheSize;
  90. extern DWORD g_EsentStartFlushThreshold;
  91. extern DWORD g_EsentStopFlushThreadhold;
  92. //
  93. // Reissuance Parameters
  94. //
  95. extern DWORD g_dwReissueLeaseMinimum;
  96. extern DWORD g_dwReissueLeaseRange;
  97. extern DWORD g_dwReissueLeaseLeeway;
  98. extern DWORD g_dwReissueExpireThreadSleep;
  99. //
  100. // Counters
  101. //
  102. extern LONG g_lTemporaryLicensesIssued;
  103. extern LONG g_lPermanentLicensesIssued;
  104. extern LONG g_lPermanentLicensesReissued;
  105. extern LONG g_lPermanentLicensesReturned;
  106. extern LONG g_lLicensesMarked;
  107. #endif