Obtaining License Manager Information
Declare Variables/Constants
static const char *pcScopeServerInfo = "<sentinelScope/>";
sntl_licensing_attr_t *pAttrAppContext = NULL;
sntl_licensing_app_context_t *pAppContext = NULL;
char *pcServerInfo = NULL;
API Calls
To obtain License Manager Information, execute the APIs in the specified sequential order only:
sntl_licensing_attr_new(&pAttrAppContext);
sntl_licensing_attr_set(pAttrAppContext, SNTL_ATTR_APPCONTEXT_CONTACT_SERVER, CONTACT_SERVER);
NOTE If instead the LSFORCEHOST or LSHOST environment variables are set, then the above-mentioned steps are not required.
sntl_licensing_app_context_new(0, pAttrAppContext, &pAppContext);
sntl_licensing_get_info(pAppContext, pcScopeServerInfo, SNTL_QUERY_SERVER_INFO_VERSION(v), &pcServerInfo);
If the sntl_licensing_get_info call is successful, the pcServerInfo parameter contains an XML-based output having the detailed information of Server Info.
Note
In the use case described above, ServerInfo is obtained when the contact server is set (for the remaining attributes, default values are obtained).