windows-nt/Source/XPSP1/NT/termsrv/license/tlserver/rpc/hydrals.idl
2020-09-26 16:20:57 +08:00

210 lines
8.3 KiB
Plaintext

//+--------------------------------------------------------------------------
//
// Microsoft Windows
// Copyright (C) Microsoft Corporation, 1996-1997
//
// File:
//
// Contents: IDL source for Hydra License Server
//
//---------------------------------------------------------------------------
[
uuid(12d4b7c8-77d5-11d1-8c24-00c04fa3080d),
version(1.0),
pointer_default(unique)
]
interface HydraLicenseService
{
import "wtypes.idl";
import "license.idl";
import "tlsapi.idl";
typedef [context_handle] void* PCONTEXT_HANDLE;
typedef [ref] PCONTEXT_HANDLE* PPCONTEXT_HANDLE;
typedef DWORD CHALLENGE_CONTEXT;
typedef CHALLENGE_CONTEXT* PCHALLENGE_CONTEXT;
typedef struct _LICENSE_REQUEST_XMIT_TYPE {
DWORD dwLangId;
DWORD dwPlatformId;
DWORD dwVersion;
DWORD cbCompanyName;
DWORD cbProductId;
DWORD cbEncryptedHwid;
[size_is(cbCompanyName + cbProductId + cbEncryptedHwid)] BYTE pbData[];
} LICENSE_REQUEST_XMIT_TYPE;
typedef [transmit_as(LICENSE_REQUEST_XMIT_TYPE)] LICENSEREQUEST LICENSE_REQUEST_TYPE;
//-----------------------------------------------------------------
// General routine
//
error_status_t
LSConnect([in] handle_t binding, [out] PCONTEXT_HANDLE *pphContext);
error_status_t
LSDisconnect( [in, out] PPCONTEXT_HANDLE pphContext );
error_status_t
LSSendServerCertificate( [in] PCONTEXT_HANDLE phContext,
[in] DWORD cbCert,
[in, size_is(cbCert)] PBYTE pbCert );
error_status_t
LSGetServerName( [in] PCONTEXT_HANDLE phContext,
[in, out, string, size_is(*pcbSize)] LPTSTR szMachineName,
[in, out] PDWORD pcbSize );
error_status_t
LSGetServerScope( [in] PCONTEXT_HANDLE phContext,
[in, out, string, size_is(*pcbSize)] LPTSTR szScopeName,
[in, out] PDWORD pcbSize );
error_status_t
LSGetRevokeKeyPackList( [in] PCONTEXT_HANDLE phContext,
[in, out] PDWORD pcbNumberOfKeyPack,
[in , out, size_is(*pcbNumberOfKeyPack)] PDWORD pRevokeKeyPackList);
error_status_t
LSGetRevokeLicenseList( [in] PCONTEXT_HANDLE phContext,
[in, out] PDWORD pcbNumberOfLicenses,
[in, out, size_is(*pcbNumberOfLicenses)] PDWORD pRevokeLicenseList);
error_status_t
LSValidateLicense( [in] PCONTEXT_HANDLE phContext,
[in] DWORD cbLicense,
[in, size_is(cbLicense)] BYTE* pbLicense);
error_status_t
LSGetInfo([in] PCONTEXT_HANDLE phContext,
[in] DWORD cbHSCert,
[in, size_is(cbHSCert)] PBYTE pHSCert,
[out, ref] DWORD* pcbLSCert,
[out, size_is(, *pcbLSCert)] BYTE **pLSCert,
[out, ref] DWORD* pcbLSSecretKey,
[out, size_is(, *pcbLSSecretKey)] BYTE **pLSSecretKey);
error_status_t
LSIssuePlatformChallenge( [in] PCONTEXT_HANDLE phContext,
[in] DWORD dwClientInfo,
[out, ref] PCHALLENGE_CONTEXT pChallengeContext,
[out] PDWORD pcbChallengeData,
[out, size_is(, *pcbChallengeData)] BYTE **pChallengeData);
error_status_t
LSIssueNewLicense([in] PCONTEXT_HANDLE phContext,
[in] CHALLENGE_CONTEXT ChallengeContext,
[in] LICENSE_REQUEST_TYPE* pRequest,
[in, string] LPTSTR pMachineName,
[in, string] LPTSTR pUserName,
[in] DWORD cbChallengeResponse,
[in, size_is(cbChallengeResponse)] PBYTE cbChallenge,
[in] BOOL bAcceptTemporaryLicense,
[out] PDWORD pcbLicense,
[out, size_is(, *pcbLicense)] BYTE **pLicense);
error_status_t
LSUpgradeLicense([in] PCONTEXT_HANDLE phContext,
[in] DWORD cbOldLicense,
[in, size_is(cbOldLicense)] PBYTE pOldLicense,
[in] DWORD dwClientInfo,
[out] PDWORD pcbNewLicense,
[out, size_is(, *pcbNewLicense)] PBYTE *pNewLicense);
error_status_t
LSAllocateConcurrentLicense([in] PCONTEXT_HANDLE phContext,
[in, string] LPTSTR szHydraServer,
[in] LICENSE_REQUEST_TYPE* pRequest,
[in, out, ref] LONG* dwQuantity);
error_status_t
LSGetLastError( [in] PCONTEXT_HANDLE phContext,
[in] DWORD cbBufferSize,
[in, out, string] LPTSTR szBuffer);
//----------------------------------------------------------------------------------
// License Key Pack related function
error_status_t
LSKeyPackEnumBegin( [in] PCONTEXT_HANDLE phContext,
[in] DWORD dwSearchParm,
[in] BOOL bMatchAll,
[in, ref] LPLSKeyPackSearchParm lpSearchParm);
error_status_t
LSKeyPackEnumNext( [in] PCONTEXT_HANDLE phContext,
[out, ref] LPLSKeyPack lpKeyPack);
error_status_t
LSKeyPackEnumEnd( [in] PCONTEXT_HANDLE phContext );
error_status_t
LSKeyPackAdd( [in] PCONTEXT_HANDLE phContext,
[in, out, ref] LPLSKeyPack lpKeypack);
error_status_t
LSKeyPackSetStatus( [in] PCONTEXT_HANDLE phContext,
[in] DWORD dwSetParm,
[in, ref] LPLSKeyPack lpKeyPack);
//----------------------------------------------------------------------------------
// Issued Licenses related function
error_status_t
LSLicenseEnumBegin( [in] PCONTEXT_HANDLE phContext,
[in] DWORD dwSearchParm,
[in] BOOL bMatchAll,
[in, ref] LPLSLicenseSearchParm lpSearchParm);
error_status_t
LSLicenseEnumNext( [in] PCONTEXT_HANDLE phContext,
[out, ref] LPLSLicense lpLicense);
error_status_t
LSLicenseEnumEnd( [in] PCONTEXT_HANDLE phContext);
error_status_t
LSLicenseSetStatus([in] PCONTEXT_HANDLE phContext,
[in] DWORD dwSetParam,
[in] LPLSLicense lpLicense);
error_status_t
LSLicenseGetCert( [in] PCONTEXT_HANDLE phContext,
[in, ref] LPLSLicense lpLicense,
[out] LPDWORD cbCert,
[out, size_is(,*cbCert)] PBYTE* pbCert);
//---------------------------------------------------------------------------------
// General routine
error_status_t
LSGetAvailableLicenses([in] PCONTEXT_HANDLE phContext,
[in] DWORD dwSearchParm,
[in, ref] LPLSKeyPack lplsKeyPack,
[out, ref] LPDWORD lpdwAvail);
//---------------------------------------------------------------------------------
// CH specific routine
error_status_t
LSInstallCertificate( [in] PCONTEXT_HANDLE phContext,
[in] DWORD dwCertType,
[in] DWORD dwCertLevel,
[in] DWORD cbSingnatureCert,
[in, size_is(cbSingnatureCert)] PBYTE pbSingnatureCert,
[in] DWORD cbExchangeCert,
[in, size_is(cbExchangeCert)] PBYTE pbExchangeCert);
error_status_t
LSGetServerCertificate( [in] PCONTEXT_HANDLE phContext,
[in] BOOL bSignCert,
[out, size_is(, *lpdwCertBlobLen)] LPBYTE *ppCertBlob,
[out, ref] LPDWORD lpdwCertBlobLen);
error_status_t
LSRegisterLicenseKeyPack([in] PCONTEXT_HANDLE phContext,
[in, size_is(cbCHCertBlobSize)] LPBYTE pbCHCertBlob,
[in] DWORD cbCHCertBlobSize,
[in, size_is(cbRootCertBlob)] LPBYTE pbRootCertBlob,
[in] DWORD cbRootCertBlob,
[in, size_is(dwKeyPackBlobLen)] LPBYTE lpKeyPackBlob,
[in] DWORD dwKeyPackBlobLen);
}