VLSgetServInfo

Syntax

LS_STATUS_CODE VLSgetServInfo (	 	 
unsigned char	 	*server_name,
VLSservInfo	 	*srv_info,
unsigned char	 	*unused1,
unsigned long	 	*unused2 );
Argument Direction Data Type Description
server_name IN unsigned char*

The name of the License Manager you would like to retrieve information from.

You can pass this as NULL to pick up the License Manager name if any previously set. However, if no License Manager name is found, an error will be returned.

If not set to NULL, this value is independent of the values set using mechanisms like LSFORCEHOST and VLSsetContactServer.

srv_info OUT VLSservInfo*

This points to the VLSservInfo data structure, which is populated with information returned from the License Manager. This parameter cannot be NULL and memory allocation is caller’s responsibility.

Description

Returns information regarding the given License Manager, including version, locale, platform, and the locking information of the computer on which the License Manager is running. After a successful call, the VLSservInfo data structure will contain the information returned from the License Manager.

This call will also return the locking information for the computer on which the License Manager is running. This can be used to generate locking codes as the echoid utility does.

Call VLSinitialize before calling this API, if you want this API to read the environment variables set, except LSHOST, as it is not considered by this API at all for obtaining the License Manager name (server_name).

Returns

The status code LS_SUCCESS is returned if successful. Otherwise, it will return the following error codes:

Error Code

Description

VLS_CALLING_ERROR

The srv_info variable is NULL.

VLS_NOT_SUPPORTED

The API is introduced in the v7.2.0 (Windows). Hence, this error can occur when incompatible versions of the client library and the License Manager interact.

VLS_NO_SERVER_FILE When server name is set to NULL but no License Manager name is found.

For a complete list of the error codes, see Licensing Library Error and Result Codes.