Page tree
Skip to end of metadata
Go to start of metadata

The information on this page refers to LM-X v4.9.16 or newer, which added the LMX_Admin_RestartServer function. This setting is not available in previous versions of LM-X. 

The LMX_Admin_RestartServer function restarts the specified server.


LMX_STATUS LMX_Admin_RestartServer
   LMX_HANDLE LmxHandle,
   const char *szHostname,
   int nPort,
   const char *szPassword


[in/out] LM-X handle.

[in] Hostname of the license server to be restarted. The maximum length of the hostname can be up to LMX_MAX_LONG_STRING_LENGTH.

[in] Port of the license server to be restarted. Port must be within the range of 1 - 65535.

[in] Password of the license server to be restarted. The maximum length of the password 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 Return codes.


This function sends a restart command to the license server specified in szHostname. If the password specified in szPassword matches the password in the license server's configuration file, the server will be restarted, and LMX_SUCCESS will be returned. If the passwords do not match, the server will not be restarted, and LMX_LMX_NETWORK_DENY will be returned.

(Note: License server restart can also be done using the LM-X web-based UI, as described in Restarting or shutting down the server.)