The LAC_GetLicense function will retrieve the license generated from the LAC_CreateLicenseRequest function.
Prototype
LAC_STATUS LAC_GetLicense
(
const char *szActivationKey,
const char *szHostid,
const char *szUrl,
const char *szProxyHostname,
int nProxyPort,
const char *szProxyUsername,
const char *szProxyPassword,
char *szResult
);
Parameters
szActivationKey
[in] Activation key (for example, 9EFJK-TVJM0-MCDET-EZKXJ).
szHostid
[in] An optional client-side HostID, in the format type=value (for example, HOSTNAME=my_hostname). This value should be NULL if not relevant. See your license manager documentation (for example, the LM-X Developers Manual) for valid HostID types. You may also use a comma-separated list of multiple HostIDs, in which case LAC will select the first appropriate value.
szUrl
[in] SOAP API endpoint URL. This value should be set to http://license.x-formation.com/soap/type/enduser/version/2.
szProxyHostname
[in] An optional client-side proxy host to be used with a request. This value should be NULL if not relevant.
nProxyPort
[in] An optional client-side proxy port number to be used with a request. This value should be 0 if not relevant.
szProxyUsername
[in] An optional client-side proxy username to be used with a request. This value should be NULL if not relevant.
szProxyPassword
[in] An optional client-side proxy password to be used with a request. This value should be NULL if not relevant.
szResult
[out] Pointer to a string that will hold the license or error message. The string length can be up to LAC_MAX_RESPONSE_LENGTH.
Return Values
On success, this function returns the status code LAC_SUCCESS and retrieves a generated license.
You may need to call GetLicense multiple times after creating a license request, because it can take from a few seconds up to a few minutes to get the generated license. Your application should account for this by displaying an appropriate wait icon/message and calling the LAC_GetLicense function multiple times until the request succeeds. We recommend calling LAC_GetLicense no more often than once every 10 seconds.
On failure, this function returns an error code in the format described in Return codes.