The LMX_Admin_UploadLicense function uploads a license file to the server.

Prototype

 

LMX_STATUS LMX_Admin_UploadLicense
(
   LMX_HANDLE LmxHandle,
   const char *szLicenseFilename,
   const char *szLicenseContent
);

Parameters

LmxHandle
[in/out] LM-X handle.

szLicenseFilename
[in] The name under which to save the license file on the server side, with an lic extension; for example, filename.lic. If this parameter is empty, then the name is automatically generated on the server side. The maximum length of the filename can be up to LMX_MAX_NAME_LENGTH.

szLicenseContent
[in] License file content. The maximum length of the license file content can be up to LMX_MAX_LONG_STRING_LENGTH.

Return values

On success, this function returns the status code LMX_SUCCESS.

On failure, this function returns an error code in the format described in SOAP API return codes.

Remarks

This function sends license file content to the license server that is specified in LMX_OPT_LICENSE_PATH and saves the license file to the default location on that license server. This license file will then be used automatically upon the next license server restart. Only paths set through LMX_SetOption and LMX_OPT_LICENSE_PATH will be used; all other paths will be ignored. This ensures full control of which server the license will be uploaded to.

If the license file already exists, the new license file will overwrite the existing license file. This also makes it possible to remove a license file of the same name by replacing it with an empty file.

(Note: License file upload can also be done using the LM-X web-based UI as described in Managing licenses.)