Source code of Windows XP (NT5)
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.

132 lines
3.1 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1997.
  5. //
  6. // File: Hcpack.h
  7. //
  8. // Contents: Functions that are used to pack and unpack different messages
  9. // coming in to and going out from Hydra Client
  10. // Classes:
  11. //
  12. // Functions:
  13. //
  14. // History: 12-20-97 v-sbhatt Created
  15. //
  16. //----------------------------------------------------------------------------
  17. #ifndef _HCPACK_H_
  18. #define _HCPACK_H_
  19. #ifdef __cplusplus
  20. extern "C" {
  21. #endif
  22. //
  23. // Functions for Packing different Client Messages from the corresponding
  24. // structures to simple binary blob
  25. //
  26. LICENSE_STATUS
  27. PackHydraClientNewLicenseRequest(
  28. IN PHydra_Client_New_License_Request pCanonical,
  29. IN BOOL fExtendedError,
  30. OUT BYTE FAR * pbBuffer,
  31. IN OUT DWORD FAR * pcbBuffer
  32. );
  33. LICENSE_STATUS
  34. PackHydraClientLicenseInfo(
  35. IN PHydra_Client_License_Info pCanonical,
  36. IN BOOL fExtendedError,
  37. OUT BYTE FAR * pbBuffer,
  38. IN OUT DWORD FAR * pcbBuffer
  39. );
  40. LICENSE_STATUS
  41. PackHydraClientPlatformChallengeResponse(
  42. IN PHydra_Client_Platform_Challenge_Response pCanonical,
  43. IN BOOL fExtendedError,
  44. OUT BYTE FAR * pbBuffer,
  45. IN OUT DWORD FAR * pcbBuffer
  46. );
  47. LICENSE_STATUS
  48. PackLicenseErrorMessage(
  49. IN PLicense_Error_Message pCanonical,
  50. IN BOOL fExtendedError,
  51. OUT BYTE FAR * pbBuffer,
  52. IN OUT DWORD FAR * pcbBuffer
  53. );
  54. //
  55. // Functions for unpacking different Hydra Server Messages from
  56. // simple binary blobs to corresponding structure
  57. //
  58. LICENSE_STATUS
  59. UnPackLicenseErrorMessage(
  60. IN BYTE FAR * pbMessage,
  61. IN DWORD cbMessage,
  62. OUT PLicense_Error_Message pCanonical
  63. );
  64. LICENSE_STATUS
  65. UnpackHydraServerLicenseRequest(
  66. IN BYTE FAR * pbMessage,
  67. IN DWORD cbMessage,
  68. OUT PHydra_Server_License_Request pCanonical
  69. );
  70. LICENSE_STATUS
  71. UnPackHydraServerPlatformChallenge(
  72. IN BYTE FAR * pbMessage,
  73. IN DWORD cbMessage,
  74. OUT PHydra_Server_Platform_Challenge pCanonical
  75. );
  76. LICENSE_STATUS
  77. UnPackHydraServerNewLicense(
  78. IN BYTE FAR * pbMessage,
  79. IN DWORD cbMessage,
  80. OUT PHydra_Server_New_License pCanonical
  81. );
  82. LICENSE_STATUS
  83. UnPackHydraServerUpgradeLicense(
  84. IN BYTE FAR * pbMessage,
  85. IN DWORD cbMessage,
  86. OUT PHydra_Server_Upgrade_License pCanonical
  87. );
  88. #if 0
  89. LICENSE_STATUS
  90. UnpackHydraServerCertificate(
  91. IN BYTE FAR * pbMessage,
  92. IN DWORD cbMessage,
  93. OUT PHydra_Server_Cert pCaonical
  94. );
  95. #endif
  96. LICENSE_STATUS
  97. UnpackNewLicenseInfo(
  98. BYTE FAR * pbMessage,
  99. DWORD cbMessage,
  100. PNew_License_Info pCanonical
  101. );
  102. LICENSE_STATUS
  103. UnPackExtendedErrorInfo(
  104. UINT32 *puiExtendedErrorInfo,
  105. Binary_Blob *pbbErrorInfo
  106. );
  107. #ifdef __cplusplus
  108. }
  109. #endif
  110. #endif //_HCPACK_H_