Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The LMX_GetFeatureInfo function retrieves information for a checked out feature.

Prototype

Code Block
languagecpp
LMX_STATUS LMX_GetFeatureInfo
(
   LMX_HANDLE LmxHandle,
   const char *szFeatureName,
   LMX_FEATURE_INFO *pFI
);

Parameters

LmxHandle
[in] LM-X handle.

...

pFI
[out] Pointer to the feature information structure. For more details, see the table of LMX_FEATURE_INFO fields in Remarks, below.

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.

Remarks

Use this API call to retrieve feature settings, as described in the following table. Note that trial licenses have substantially less information available than other license types, because they are a pre-configured license type and do not have the same flexibility.

...

Code Block
languagecpp
#include <lmx.h>
#include <stdio.h>

LMX_HANDLE h;

int main() 
{
  LMX_FEATURE_INFO FI;

  exit_on_error(LMX_Init(&h));
  exit_on_error(LMX_Checkout(h, "f2", 1, 0, 1));
  exit_on_error(LMX_GetFeatureInfo(h, "f2", &FI));
  int nTimeLeft;
  nTimeLeft = LMX_GetExpireTime(h, "f2");
  if (nTimeLeft == -2)
    printf("This feature does not expire\n");
  else if (nTimeLeft == -1)
    printf("This feature is expired\n");
  else /* feature has not yet expired */ 
    printf("Hours left for this feature: %d\n", nTimeLeft);
  return 0;
}