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
5.4 KiB

  1. /*++
  2. Copyright (c) 1994 Microsoft Corporation
  3. Module Name:
  4. msvctbl.h
  5. Abstract:
  6. See msvctbl.c
  7. Author:
  8. Arthur Hanson (arth) Dec 07, 1994
  9. Environment:
  10. Revision History:
  11. Jeff Parham (jeffparh) 05-Dec-1995
  12. o Added comments.
  13. --*/
  14. #ifndef _LLS_MSVCTBL_H
  15. #define _LLS_MSVCTBL_H
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19. #define IDS_BACKOFFICE 1500
  20. /////////////////////////////////////////////////////////////////////////
  21. //
  22. // The master service record is for license usage tracking. We have
  23. // A master ROOT record for a family of products (say SQL Server) and
  24. // a sub linked-list of each of the specific versions in order of the
  25. // version number. When we do license checking we can move on up the tree
  26. // to higher level of licenses.
  27. //
  28. // There is also a mapping table kept for each of the ROOT records. This
  29. // tracks if the mapping license count has already been used.
  30. //
  31. struct _MASTER_SERVICE_ROOT;
  32. typedef struct _MASTER_SERVICE_RECORD
  33. {
  34. ULONG Index; // index at which
  35. // a pointer to this
  36. // structure may be
  37. // found in the
  38. // MasterServiceTable
  39. LPTSTR Name; // product name
  40. DWORD Version; // version of the
  41. // product;
  42. // major.minor ->
  43. // (major << 16)
  44. // | minor, e.g.,
  45. // 5.2 -> 0x50002
  46. struct _MASTER_SERVICE_ROOT * Family; // pointer to the
  47. // product family,
  48. // e.g., "SNA 2.1"
  49. // -> "SNA"
  50. ULONG Licenses;
  51. ULONG LicensesUsed;
  52. ULONG LicensesClaimed;
  53. ULONG MaxSessionCount;
  54. ULONG HighMark;
  55. ULONG next; // index at which
  56. // a pointer to the
  57. // next ascending
  58. // version of this
  59. // product may be
  60. // found in the
  61. // MasterServiceTable
  62. // NOTE: index is
  63. // 1-based, so if
  64. // next == 0 there
  65. // are no more, and
  66. // if non-zero then
  67. // the next version
  68. // is at index next-1
  69. } MASTER_SERVICE_RECORD, *PMASTER_SERVICE_RECORD;
  70. typedef struct _MASTER_SERVICE_ROOT
  71. {
  72. LPTSTR Name; // name of this product family
  73. DWORD Flags;
  74. RTL_RESOURCE ServiceLock; // lock for changes to the
  75. // Services array (below)
  76. ULONG ServiceTableSize; // number of entries in Services
  77. // array (below)
  78. ULONG * Services; // array of indices into the
  79. // MasterServiceTable of the various
  80. // (product,version) pairs
  81. // belonging to this family;
  82. // sorted in order of ascending
  83. // version
  84. } MASTER_SERVICE_ROOT, *PMASTER_SERVICE_ROOT;
  85. extern ULONG RootServiceListSize;
  86. extern PMASTER_SERVICE_ROOT *RootServiceList;
  87. extern ULONG MasterServiceListSize;
  88. extern PMASTER_SERVICE_RECORD *MasterServiceList;
  89. extern PMASTER_SERVICE_RECORD *MasterServiceTable;
  90. extern RTL_RESOURCE MasterServiceListLock;
  91. extern TCHAR BackOfficeStr[];
  92. extern PMASTER_SERVICE_RECORD BackOfficeRec;
  93. NTSTATUS MasterServiceListInit();
  94. PMASTER_SERVICE_RECORD MServiceRecordFind( DWORD Version, ULONG NumServiceEntries, PULONG ServiceList );
  95. PMASTER_SERVICE_ROOT MServiceRootFind( LPTSTR ServiceName );
  96. PMASTER_SERVICE_RECORD MasterServiceListFind( LPTSTR DisplayName );
  97. PMASTER_SERVICE_RECORD MasterServiceListAdd( LPTSTR FamilyName, LPTSTR Name, DWORD Version );
  98. #if DBG
  99. VOID MasterServiceRootDebugDump();
  100. VOID MasterServiceRootDebugInfoDump( PVOID Data );
  101. VOID MasterServiceListDebugDump();
  102. VOID MasterServiceListDebugInfoDump( PVOID Data );
  103. #endif
  104. #ifdef __cplusplus
  105. }
  106. #endif
  107. #endif