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.

107 lines
6.2 KiB

  1. /**INC+**********************************************************************/
  2. /* Header: SLicense.h */
  3. /* */
  4. /* Purpose: Server License Manager functions */
  5. /* */
  6. /* Copyright(C) Microsoft Corporation 1997 */
  7. /* */
  8. /****************************************************************************/
  9. /** Changes:
  10. * $Log$
  11. **/
  12. /**INC-**********************************************************************/
  13. #ifndef _SLICENSE_H
  14. #define _SLICENSE_H
  15. //
  16. // License Handle
  17. //
  18. typedef struct _License_Handle
  19. {
  20. PBYTE pDataBuf; // pointer to data buffer
  21. UINT cbDataBuf; // size of data buffer
  22. PKEVENT pDataEvent; // used to wait for data event
  23. PBYTE pCacheBuf; // points to a cache buffer
  24. UINT cbCacheBuf; // size of cache buffer
  25. NTSTATUS Status; // status of the previous operation
  26. //
  27. // do we need a spin lock to protect this data structure?
  28. //
  29. } License_Handle, * PLicense_Handle;
  30. /**PROC+*********************************************************************/
  31. /* Name: SLicenseInit */
  32. /* */
  33. /* Purpose: Initialize License Manager */
  34. /* */
  35. /* Returns: Handle to be passed to subsequent License Manager functions */
  36. /* */
  37. /* Params: None */
  38. /* */
  39. /* Operation: LicenseInit is called during Server initialization. Its */
  40. /* purpose is to allow one-time initialization. It returns a */
  41. /* handle which is subsequently passed to all License Manager */
  42. /* functions. A typical use for this handle is as a pointer to */
  43. /* memory containing per-instance data. */
  44. /* */
  45. /**PROC-*********************************************************************/
  46. LPVOID _stdcall SLicenseInit(VOID);
  47. /**PROC+*********************************************************************/
  48. /* Name: SLicenseData */
  49. /* */
  50. /* Purpose: Handle license data received from the Client */
  51. /* */
  52. /* Returns: None */
  53. /* */
  54. /* Params: pHandle - handle returned by LicenseInit */
  55. /* pSMHandle - SM Handle */
  56. /* pData - data received from Client */
  57. /* dataLen - length of data received */
  58. /* */
  59. /* Operation: This function is passed all license packets received from the */
  60. /* Client. It should parse the packet and respond (by calling */
  61. /* suitable SM functions - see asmapi.h) as required. The SM */
  62. /* Handle is provided so that SM calls can be made. */
  63. /* */
  64. /* If license negotiation is complete and successful, the */
  65. /* License Manager must call SM_LicenseOK. */
  66. /* */
  67. /* If license negotiation is complete but unsuccessful, the */
  68. /* License Manager must disconnect the session. */
  69. /* */
  70. /* Incoming packets from the Client will continue to be */
  71. /* interpreted as license packets until SM_LicenseOK is called, */
  72. /* or the session is disconnected. */
  73. /* */
  74. /**PROC-*********************************************************************/
  75. void _stdcall SLicenseData(LPVOID pHandle,
  76. LPVOID pSMHandle,
  77. LPVOID pData,
  78. UINT dataLen);
  79. /**PROC+*********************************************************************/
  80. /* Name: SLicenseTerm */
  81. /* */
  82. /* Purpose: Terminate Server License Manager */
  83. /* */
  84. /* Returns: None */
  85. /* */
  86. /* Params: pHandle - handle returned from LicenseInit */
  87. /* */
  88. /* Operation: This function is provided to do one-time termination of the */
  89. /* License Manager. For example, if pHandle points to per- */
  90. /* instance memory, this would be a good place to free it. */
  91. /* */
  92. /**PROC-*********************************************************************/
  93. void _stdcall SLicenseTerm(LPVOID pHandle);
  94. #endif /* _SLICENSE_H */