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.

97 lines
5.8 KiB

  1. /**INC+**********************************************************************/
  2. /* Header: CLicense.h */
  3. /* */
  4. /* Purpose: Client License Manager functions */
  5. /* */
  6. /* Copyright(C) Microsoft Corporation 1997 */
  7. /* */
  8. /****************************************************************************/
  9. /** Changes:
  10. * $Log$
  11. **/
  12. /**INC-**********************************************************************/
  13. #ifndef _CLICENSE_H
  14. #define _CLICENSE_H
  15. /****************************************************************************/
  16. /* Define the calling convention */
  17. /****************************************************************************/
  18. #define CALL_TYPE _stdcall
  19. /**PROC+*********************************************************************/
  20. /* Name: CLicenseInit */
  21. /* */
  22. /* Purpose: Initialize ClientLicense Manager */
  23. /* */
  24. /* Returns: Handle to be passed to subsequent License Manager functions */
  25. /* */
  26. /* Params: None */
  27. /* */
  28. /* Operation: LicenseInit is called during Client initialization. Its */
  29. /* purpose is to allow one-time initialization. It returns a */
  30. /* handle which is subsequently passed to all License Manager */
  31. /* functions. A typical use for this handle is as a pointer to */
  32. /* memory containing per-instance data. */
  33. /* */
  34. /**PROC-*********************************************************************/
  35. int CALL_TYPE CLicenseInit(
  36. HANDLE FAR * phContext
  37. );
  38. /**PROC+*********************************************************************/
  39. /* Name: CLicenseData */
  40. /* */
  41. /* Purpose: Handle license data received from the Server */
  42. /* */
  43. /* Returns: LICENSE_OK - License negotiation is complete */
  44. /* LICENSE_CONTINUE - License negotiation will continue */
  45. /* */
  46. /* Params: pHandle - handle returned by LicenseInit */
  47. /* pData - data received from Server */
  48. /* dataLen - length of data received */
  49. /* */
  50. /* Operation: This function is passed all license packets received from the */
  51. /* Server. It should parse the packet and respond (by calling */
  52. /* suitable SL functions - see aslapi.h) as required. */
  53. /* */
  54. /* If license negotiation is complete, this function must return */
  55. /* LICENSE_OK */
  56. /* If license negotiation is not yet complete, return */
  57. /* LICENSE_CONTINUE */
  58. /* */
  59. /* Incoming packets from the Client will continue to be */
  60. /* interpreted as license packets until this function returns */
  61. /* LICENSE_OK. */
  62. /* */
  63. /**PROC-*********************************************************************/
  64. int CALL_TYPE CLicenseData(
  65. HANDLE hContext,
  66. LPVOID pData,
  67. DWORD dataLen
  68. );
  69. #define LICENSE_OK 0
  70. #define LICENSE_CONTINUE 2
  71. #define LICENSE_ERROR 4
  72. /**PROC+*********************************************************************/
  73. /* Name: CLicenseTerm */
  74. /* */
  75. /* Purpose: Terminate Client License Manager */
  76. /* */
  77. /* Returns: None */
  78. /* */
  79. /* Params: pHandle - handle returned from LicenseInit */
  80. /* */
  81. /* Operation: This function is provided to do one-time termination of the */
  82. /* License Manager. For example, if pHandle points to per- */
  83. /* instance memory, this would be a good place to free it. */
  84. /* */
  85. /**PROC-*********************************************************************/
  86. int CALL_TYPE CLicenseTerm(
  87. HANDLE hContext
  88. );
  89. #endif /* _CLICENSE_H */