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.

151 lines
3.7 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 "postsrv.h"
  17. #ifndef INITGUID
  18. #define INITGUID
  19. #include <guiddef.h>
  20. #undef INITGUID
  21. #else
  22. #include <guiddef.h>
  23. #endif
  24. //---------------------------------------------------------------------------
  25. // All globals variable are declared in globals.cpp
  26. //
  27. #ifndef _NO_ODBC_JET
  28. extern TLSDbWorkSpace* g_DbWorkSpace;
  29. #endif
  30. // Defaule server scope
  31. extern CTlsVssJetWriter *g_pWriter;
  32. extern GUID idWriter;
  33. extern DWORD GetPageSize( VOID );
  34. extern BOOL MyVirtualAlloc( IN DWORD dwSize,
  35. OUT PVOID *ppvData );
  36. extern VOID MyVirtualFree( IN PVOID pvData ) ;
  37. //---------------------------------------------------------------------------
  38. extern TCHAR g_szScope[LSERVER_MAX_STRING_SIZE+1];
  39. extern LPTSTR g_pszScope;
  40. extern TCHAR g_szDatabaseFile[MAX_PATH+1];
  41. extern TCHAR g_szDatabaseDir[MAX_PATH+1];
  42. extern TCHAR g_szDatabaseFname[MAX_PATH+1];
  43. extern TCHAR g_szDbUser[MAXUSERNAMELENGTH+1];
  44. extern TCHAR g_szDbPwd[MAXUSERNAMELENGTH+1];
  45. extern LPCTSTR szManufactureMS;
  46. extern LONG g_NextKeyPackId;
  47. extern LONG g_NextLicenseId;
  48. extern PBYTE g_pbSecretKey;
  49. extern DWORD g_cbSecretKey;
  50. extern LPTSTR g_pszServerUniqueId;
  51. extern DWORD g_cbServerUniqueId;
  52. extern LPTSTR g_pszServerPid;
  53. extern DWORD g_cbServerPid;
  54. extern PBYTE g_pbServerSPK;
  55. extern DWORD g_cbServerSPK;
  56. extern DWORD g_GracePeriod;
  57. extern BOOL g_IssueTemporayLicense;
  58. extern BOOL g_bHasHydraCert;
  59. extern PBYTE g_pbSignatureEncodedCert;
  60. extern DWORD g_cbSignatureEncodedCert;
  61. extern PBYTE g_pbExchangeEncodedCert;
  62. extern DWORD g_cbExchangeEncodedCert;
  63. extern TCHAR g_szHostName[MAXTCPNAME+1];
  64. extern DWORD g_cbHostName;
  65. extern TCHAR g_szComputerName[MAX_COMPUTERNAME_LENGTH+2];
  66. extern DWORD g_cbComputerName;
  67. extern PCCERT_CONTEXT g_LicenseCertContext;
  68. extern HCRYPTPROV g_hCryptProv;
  69. extern PCCERT_CONTEXT g_SelfSignCertContext;
  70. extern DWORD g_GeneralDbTimeout;
  71. extern DWORD g_EnumDbTimeout;
  72. extern DWORD g_dwMaxDbHandles;
  73. #if ENFORCE_LICENSING
  74. extern HCERTSTORE g_hCaStore;
  75. extern HKEY g_hCaRegKey;
  76. #endif
  77. extern HCRYPTKEY g_SignKey;
  78. extern HCRYPTKEY g_ExchKey;
  79. //extern PBYTE g_pbDomainSid;
  80. //extern DWORD g_cbDomainSid;
  81. extern DWORD g_SrvRole;
  82. extern LPTSTR g_szDomainGuid;
  83. extern PCERT_EXTENSIONS g_pCertExtensions;
  84. extern DWORD g_cbCertExtensions;
  85. extern FILETIME g_ftCertExpiredTime;
  86. extern FILETIME g_ftLastShutdownTime;
  87. extern DWORD g_dwTlsJobInterval;
  88. extern DWORD g_dwTlsJobRetryTimes;
  89. extern DWORD g_dwTlsJobRestartTime;
  90. extern SERVER_ROLE_IN_DOMAIN g_ServerRoleInDomain;
  91. extern DWORD g_LowLicenseCountWarning;
  92. extern DWORD g_EsentMaxCacheSize;
  93. extern DWORD g_EsentStartFlushThreshold;
  94. extern DWORD g_EsentStopFlushThreadhold;
  95. extern DWORD g_EsentMaxVerPages;
  96. //
  97. // Reissuance Parameters
  98. //
  99. extern DWORD g_dwReissueLeaseMinimum;
  100. extern DWORD g_dwReissueLeaseRange;
  101. extern DWORD g_dwReissueLeaseLeeway;
  102. extern DWORD g_dwReissueExpireThreadSleep;
  103. //
  104. // Counters
  105. //
  106. extern LONG g_lTemporaryLicensesIssued;
  107. extern LONG g_lPermanentLicensesIssued;
  108. extern LONG g_lPermanentLicensesReissued;
  109. extern LONG g_lPermanentLicensesReturned;
  110. extern LONG g_lLicensesMarked;
  111. #endif