Distributed Tuning Interface Reference : PvAddLicense()
 
PvAddLicense()
Applies (authorizes) the specified license from the computer indicated by the connection.
Header File: dtilicense.h (See also Header Files)
Function First Available In Library: w3dbav80.dll (Windows), libpsqldti.so (Linux), libpsqldti.dylib (macOS) (See also Link Libraries)
Syntax
BTI_API PvAddLicense(
   BTI_LONG        hConnection,
   BTI_CHAR_PTR    license);
Arguments
 
In
hConnection
Connection handle that identifies the server. Connection handles are obtained with the PvConnectServer() function.
In
license
License to be applied (authorized).
Return Values
 
P_OK
The operation completed successfully.
P_E_FAIL
The operation did not complete successfully.
P_E_LIC_ALREADY_INSTALLED
The license is already applied.
P_E_LIC_INVALID
The license specified is invalid.
Status code pertaining to license administration or to authorization
See Status Codes and Messages for License Administrator Status Codes and Authorization Status Codes.
Remarks
The following preconditions must be met:
DTI session started by calling PvStart().
Connection established by PvConnectServer() or if you are performing the operation on a local machine, P_LOCAL_DB_CONNECTION may be used as the connection handle.
Example
BTI_CHAR_PTR add_lic = "ERXVD3U4ZS9KR94QPDHV5BN2";
status = PvAddLicense(P_LOCAL_DB_CONNECTION, add_lic);
See Also
PvValidateLicenses()
PvDeleteLicense()
PvGetProductsInfo()
PvStop()
PvStart()