LAC_CreateLicenseRequest

The LAC_CreateLicenseRequest function will create a license request and generate a license.

Prototype

LAC_STATUS LAC_CreateLicenseRequest
(
    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\] Hostid, in the format _type_=_value_ (for example, HOSTNAME=my_hostname)

szUrl

\[in\] SOAP API endpoint URL (this value should be set to [http://license.x-formation.com/soap/type/enduser/version/1)|http://license.x-formation.com/soap/type/enduser/version/1%29]

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. The license can then be retrieved using LAC_GetLicense.

On failure, this function returns an error code in the format described in Return codes.

For a gSoap error, the returned value will be in the range of 899-999 and is equivalent to the gSoap error code, plus LAC_SOAP_BASE = 900. In this case, there is no error message, and most popular gSoap errors are specified within LAC_STATUS enum.