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.

114 lines
3.7 KiB

  1. /*++
  2. Copyright (c) 1995 Microsoft Corporation
  3. Module Name:
  4. Purchase.h
  5. Abstract:
  6. Author:
  7. Arthur Hanson (arth) Dec 07, 1994
  8. Environment:
  9. Revision History:
  10. Jeff Parham (jeffparh) 05-Dec-1995
  11. o Added support for uniting per seat and per server purchase models.
  12. o Added extra parameters and code to support secure certificates and
  13. certificate database.
  14. --*/
  15. #ifndef _LLS_PURCHASE_H
  16. #define _LLS_PURCHASE_H
  17. #ifdef __cplusplus
  18. extern "C" {
  19. #endif
  20. typedef struct _LICENSE_SERVICE_RECORD {
  21. LPTSTR ServiceName;
  22. ULONG Index;
  23. LONG NumberLicenses;
  24. } LICENSE_SERVICE_RECORD, *PLICENSE_SERVICE_RECORD;
  25. typedef struct _LICENSE_PURCHASE_RECORD {
  26. PLICENSE_SERVICE_RECORD Service;
  27. LONG NumberLicenses;
  28. DWORD Date;
  29. LPTSTR Admin;
  30. LPTSTR Comment;
  31. // added for SUR:
  32. PLICENSE_SERVICE_RECORD PerServerService; // points to per server
  33. // license tally for this
  34. // service
  35. DWORD AllowedModes; // bit field: 1, allowed
  36. // to be used in per seat
  37. // mode; 2, per server
  38. DWORD CertificateID; // identifies the secure
  39. // certificate from which
  40. // these licenses came, or
  41. // 0 if unsecure
  42. LPTSTR Source; // source of the certificate
  43. // currently supported
  44. // values are "None" and
  45. // "Paper"
  46. DWORD ExpirationDate; // time at which this
  47. // certificate expires
  48. DWORD MaxQuantity; // the largest number of licenses
  49. // that can be installed from this
  50. // certificate
  51. LPTSTR Vendor; // vendor of the product, e.g.,
  52. // "Microsoft"
  53. DWORD Secrets[ LLS_NUM_SECRETS ]; // secrets for LSAPI
  54. // challenge mechanism
  55. } LICENSE_PURCHASE_RECORD, *PLICENSE_PURCHASE_RECORD;
  56. extern ULONG LicenseServiceListSize;
  57. extern PLICENSE_SERVICE_RECORD *LicenseServiceList;
  58. extern ULONG PerServerLicenseServiceListSize;
  59. extern PLICENSE_SERVICE_RECORD *PerServerLicenseServiceList;
  60. extern PLICENSE_PURCHASE_RECORD PurchaseList;
  61. extern ULONG PurchaseListSize;
  62. extern RTL_RESOURCE LicenseListLock;
  63. NTSTATUS LicenseListInit();
  64. PLICENSE_SERVICE_RECORD LicenseServiceListFind( LPTSTR ServiceName, BOOL UsePerServerList );
  65. PLICENSE_SERVICE_RECORD LicenseServiceListAdd( LPTSTR ServiceName, BOOL UsePerServerList );
  66. ULONG ProductLicensesGet( LPTSTR ServiceName, BOOL UsePerServerList );
  67. NTSTATUS LicenseAdd( LPTSTR ServiceName, LPTSTR Vendor, LONG Quantity, DWORD MaxQuantity, LPTSTR Admin, LPTSTR Comment, DWORD Date, DWORD AllowedModes, DWORD CertificateID, LPTSTR Source, DWORD ExpirationDate, LPDWORD Secrets );
  68. #if DBG
  69. VOID LicenseListDebugDump( );
  70. #endif
  71. #ifdef __cplusplus
  72. }
  73. #endif
  74. #endif