udbLicenseInfo

Description

Returns information about the current Understand license. The database must be opened (or have been attempted to be opened) in order for the license information to be available. All strings returned are temporary, non-allocated.

Syntax

#include “udb/udb.h” 
void udbLicenseInfo(char **code, char **expire,
                    char **file, char **hostid); 

Arguments

Argument
Description
char **code
Return a temporary, non-allocated string containing the license or registration code, or NULL if none.
char **expire
Return a temporary, non-allocated string containing the time until expiration of trial, in seconds, or NULL if there is no expiration of the license.
char **file
Return a temporary, non-allocated string containing the license file path, or NULL if no license file.
char **hostid
Return a temporary, non-allocated string containing the hostid, or NULL if the hostid cannot be determined.

Return Values

There is no function return value.

Example Usage

udbLicenseInfo(&licCode, &licExpire, &licFile, 
&licHostid); 
printf ("Using license ");
if (licFile)
   printf ("in file %s ", licFile);
if (licHostid)
  printf ("from host %s ", licHostid);
if (licCode)
  printf ("with license code %s ", licCode);
if (licExpire)
  printf ("that expires in %s.\n", licExpire);
else
  printf ("that has no expiration date."); 

See Also

udbDbOpen

udbInfoBuild


Scientific Toolworks, Inc.
http://www.scitools.com