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.

209 lines
8.3 KiB

  1. //+--------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1996-1997
  5. //
  6. // File:
  7. //
  8. // Contents: IDL source for Hydra License Server
  9. //
  10. //---------------------------------------------------------------------------
  11. [
  12. uuid(12d4b7c8-77d5-11d1-8c24-00c04fa3080d),
  13. version(1.0),
  14. pointer_default(unique)
  15. ]
  16. interface HydraLicenseService
  17. {
  18. import "wtypes.idl";
  19. import "license.idl";
  20. import "tlsapi.idl";
  21. typedef [context_handle] void* PCONTEXT_HANDLE;
  22. typedef [ref] PCONTEXT_HANDLE* PPCONTEXT_HANDLE;
  23. typedef DWORD CHALLENGE_CONTEXT;
  24. typedef CHALLENGE_CONTEXT* PCHALLENGE_CONTEXT;
  25. typedef struct _LICENSE_REQUEST_XMIT_TYPE {
  26. DWORD dwLangId;
  27. DWORD dwPlatformId;
  28. DWORD dwVersion;
  29. DWORD cbCompanyName;
  30. DWORD cbProductId;
  31. DWORD cbEncryptedHwid;
  32. [size_is(cbCompanyName + cbProductId + cbEncryptedHwid)] BYTE pbData[];
  33. } LICENSE_REQUEST_XMIT_TYPE;
  34. typedef [transmit_as(LICENSE_REQUEST_XMIT_TYPE)] LICENSEREQUEST LICENSE_REQUEST_TYPE;
  35. //-----------------------------------------------------------------
  36. // General routine
  37. //
  38. error_status_t
  39. LSConnect([in] handle_t binding, [out] PCONTEXT_HANDLE *pphContext);
  40. error_status_t
  41. LSDisconnect( [in, out] PPCONTEXT_HANDLE pphContext );
  42. error_status_t
  43. LSSendServerCertificate( [in] PCONTEXT_HANDLE phContext,
  44. [in] DWORD cbCert,
  45. [in, size_is(cbCert)] PBYTE pbCert );
  46. error_status_t
  47. LSGetServerName( [in] PCONTEXT_HANDLE phContext,
  48. [in, out, string, size_is(*pcbSize)] LPTSTR szMachineName,
  49. [in, out] PDWORD pcbSize );
  50. error_status_t
  51. LSGetServerScope( [in] PCONTEXT_HANDLE phContext,
  52. [in, out, string, size_is(*pcbSize)] LPTSTR szScopeName,
  53. [in, out] PDWORD pcbSize );
  54. error_status_t
  55. LSGetRevokeKeyPackList( [in] PCONTEXT_HANDLE phContext,
  56. [in, out] PDWORD pcbNumberOfKeyPack,
  57. [in , out, size_is(*pcbNumberOfKeyPack)] PDWORD pRevokeKeyPackList);
  58. error_status_t
  59. LSGetRevokeLicenseList( [in] PCONTEXT_HANDLE phContext,
  60. [in, out] PDWORD pcbNumberOfLicenses,
  61. [in, out, size_is(*pcbNumberOfLicenses)] PDWORD pRevokeLicenseList);
  62. error_status_t
  63. LSValidateLicense( [in] PCONTEXT_HANDLE phContext,
  64. [in] DWORD cbLicense,
  65. [in, size_is(cbLicense)] BYTE* pbLicense);
  66. error_status_t
  67. LSGetInfo([in] PCONTEXT_HANDLE phContext,
  68. [in] DWORD cbHSCert,
  69. [in, size_is(cbHSCert)] PBYTE pHSCert,
  70. [out, ref] DWORD* pcbLSCert,
  71. [out, size_is(, *pcbLSCert)] BYTE **pLSCert,
  72. [out, ref] DWORD* pcbLSSecretKey,
  73. [out, size_is(, *pcbLSSecretKey)] BYTE **pLSSecretKey);
  74. error_status_t
  75. LSIssuePlatformChallenge( [in] PCONTEXT_HANDLE phContext,
  76. [in] DWORD dwClientInfo,
  77. [out, ref] PCHALLENGE_CONTEXT pChallengeContext,
  78. [out] PDWORD pcbChallengeData,
  79. [out, size_is(, *pcbChallengeData)] BYTE **pChallengeData);
  80. error_status_t
  81. LSIssueNewLicense([in] PCONTEXT_HANDLE phContext,
  82. [in] CHALLENGE_CONTEXT ChallengeContext,
  83. [in] LICENSE_REQUEST_TYPE* pRequest,
  84. [in, string] LPTSTR pMachineName,
  85. [in, string] LPTSTR pUserName,
  86. [in] DWORD cbChallengeResponse,
  87. [in, size_is(cbChallengeResponse)] PBYTE cbChallenge,
  88. [in] BOOL bAcceptTemporaryLicense,
  89. [out] PDWORD pcbLicense,
  90. [out, size_is(, *pcbLicense)] BYTE **pLicense);
  91. error_status_t
  92. LSUpgradeLicense([in] PCONTEXT_HANDLE phContext,
  93. [in] DWORD cbOldLicense,
  94. [in, size_is(cbOldLicense)] PBYTE pOldLicense,
  95. [in] DWORD dwClientInfo,
  96. [out] PDWORD pcbNewLicense,
  97. [out, size_is(, *pcbNewLicense)] PBYTE *pNewLicense);
  98. error_status_t
  99. LSAllocateConcurrentLicense([in] PCONTEXT_HANDLE phContext,
  100. [in, string] LPTSTR szHydraServer,
  101. [in] LICENSE_REQUEST_TYPE* pRequest,
  102. [in, out, ref] LONG* dwQuantity);
  103. error_status_t
  104. LSGetLastError( [in] PCONTEXT_HANDLE phContext,
  105. [in] DWORD cbBufferSize,
  106. [in, out, string] LPTSTR szBuffer);
  107. //----------------------------------------------------------------------------------
  108. // License Key Pack related function
  109. error_status_t
  110. LSKeyPackEnumBegin( [in] PCONTEXT_HANDLE phContext,
  111. [in] DWORD dwSearchParm,
  112. [in] BOOL bMatchAll,
  113. [in, ref] LPLSKeyPackSearchParm lpSearchParm);
  114. error_status_t
  115. LSKeyPackEnumNext( [in] PCONTEXT_HANDLE phContext,
  116. [out, ref] LPLSKeyPack lpKeyPack);
  117. error_status_t
  118. LSKeyPackEnumEnd( [in] PCONTEXT_HANDLE phContext );
  119. error_status_t
  120. LSKeyPackAdd( [in] PCONTEXT_HANDLE phContext,
  121. [in, out, ref] LPLSKeyPack lpKeypack);
  122. error_status_t
  123. LSKeyPackSetStatus( [in] PCONTEXT_HANDLE phContext,
  124. [in] DWORD dwSetParm,
  125. [in, ref] LPLSKeyPack lpKeyPack);
  126. //----------------------------------------------------------------------------------
  127. // Issued Licenses related function
  128. error_status_t
  129. LSLicenseEnumBegin( [in] PCONTEXT_HANDLE phContext,
  130. [in] DWORD dwSearchParm,
  131. [in] BOOL bMatchAll,
  132. [in, ref] LPLSLicenseSearchParm lpSearchParm);
  133. error_status_t
  134. LSLicenseEnumNext( [in] PCONTEXT_HANDLE phContext,
  135. [out, ref] LPLSLicense lpLicense);
  136. error_status_t
  137. LSLicenseEnumEnd( [in] PCONTEXT_HANDLE phContext);
  138. error_status_t
  139. LSLicenseSetStatus([in] PCONTEXT_HANDLE phContext,
  140. [in] DWORD dwSetParam,
  141. [in] LPLSLicense lpLicense);
  142. error_status_t
  143. LSLicenseGetCert( [in] PCONTEXT_HANDLE phContext,
  144. [in, ref] LPLSLicense lpLicense,
  145. [out] LPDWORD cbCert,
  146. [out, size_is(,*cbCert)] PBYTE* pbCert);
  147. //---------------------------------------------------------------------------------
  148. // General routine
  149. error_status_t
  150. LSGetAvailableLicenses([in] PCONTEXT_HANDLE phContext,
  151. [in] DWORD dwSearchParm,
  152. [in, ref] LPLSKeyPack lplsKeyPack,
  153. [out, ref] LPDWORD lpdwAvail);
  154. //---------------------------------------------------------------------------------
  155. // CH specific routine
  156. error_status_t
  157. LSInstallCertificate( [in] PCONTEXT_HANDLE phContext,
  158. [in] DWORD dwCertType,
  159. [in] DWORD dwCertLevel,
  160. [in] DWORD cbSingnatureCert,
  161. [in, size_is(cbSingnatureCert)] PBYTE pbSingnatureCert,
  162. [in] DWORD cbExchangeCert,
  163. [in, size_is(cbExchangeCert)] PBYTE pbExchangeCert);
  164. error_status_t
  165. LSGetServerCertificate( [in] PCONTEXT_HANDLE phContext,
  166. [in] BOOL bSignCert,
  167. [out, size_is(, *lpdwCertBlobLen)] LPBYTE *ppCertBlob,
  168. [out, ref] LPDWORD lpdwCertBlobLen);
  169. error_status_t
  170. LSRegisterLicenseKeyPack([in] PCONTEXT_HANDLE phContext,
  171. [in, size_is(cbCHCertBlobSize)] LPBYTE pbCHCertBlob,
  172. [in] DWORD cbCHCertBlobSize,
  173. [in, size_is(cbRootCertBlob)] LPBYTE pbRootCertBlob,
  174. [in] DWORD cbRootCertBlob,
  175. [in, size_is(dwKeyPackBlobLen)] LPBYTE lpKeyPackBlob,
  176. [in] DWORD dwKeyPackBlobLen);
  177. }