DtoLicenseMgr Object
DTO2 only: This object allows you to authorize and deauthorize product licenses, initiate a license validation action, and retrieve an XML string of product information.
Properties
None
Collections
None
Methods
Remarks
Obtain from Session object
Example
Dim my_session as new DtoSession
Dim result as DtoResult
Dim my_licmgr as DtoLicenseMgr
result = my_session.Connect("myserver", "username", "password")
Set my_licmgr = my_session.LicenseMgr
result = my_licmgr.AddLicense(“ERXVD3U4ZS9KR94QPDHV5BN2”)
See Also
Methods Detail
AddLicense
Authorizes a license.
Syntax
result = LicenseManager.AddLicense(License)
Arguments
LicenseManager | DtoLicenseMgr object |
License | A valid license key to authorize on the engine you are currently connected to with a DtoSession object. |
Return Values
result | DtoResult long value indicating the result of the method call. Use the Error property of the
DtoSession Object to obtain a description for the result. |
Example
Dim my_session as new DtoSession
Dim result as DtoResult
Dim my_licmgr as DtoLicenseMgr
result = my_session.Connect("myserver", "username", "password")
Set my_licmgr = my_session.LicenseMgr
result = my_licmgr.AddLicense(“ERXVD3U4ZS9KR94QPDHV5BN2”)
DeleteLicense
Deauthorizes a license.
Syntax
result = LicenseManager.DeleteLicense(License)
Arguments
LicenseManager | DtoLicenseMgr object |
License | A valid license key to deauthorize from the engine you are currently connected to with a DtoSession object. |
Return Values
result | DtoResult long value indicating the result of the method call. Use the Error property of the
DtoSession Object to obtain a description for the result. |
Remarks
None
Example
Dim my_session as new DtoSession
Dim result as DtoResult
Dim my_licmgr as DtoLicenseMgr
result = my_session.Connect("myserver", "username", "password")
Set my_licmgr = my_session.LicenseMgr
result = my_licmgr.DeleteLicense(“ERXVD3U4ZS9KR94QPDHV5BN2”)
GetProductInfo
Retrieves a list of all PSQL products found by the License Manager.
Syntax
result = LicenseManager.GetProductInfo
Arguments
LicenseManager | DtoLicenseMgr object |
Return Values
result | Returns a list of products, in an XML formatted string. |
Remarks
For information about the XML formatted string, see
Remarks for PvGetProductsInfo() in
Distributed Tuning Interface Guide.
Example
Dim session As New DtoSession
Set session = New DtoSession
Dim result As dtoResult
result = session.Connect("server", "user", "password")
If result <> Dto_Success Then
MsgBox "Error on connect." & CStr(result)
Exit Sub
End If
Dim xmlstring As String
xmlstring = session.LicenseMgr.GetProductInfo
RichTextBox1.TextRTF = xmlstring
ValidateLicenses
Initiates a check of the validity of all keys on the computer specified by the session connection.
Syntax
result = LicenseManager.ValidateLicenses
Arguments
LicenseManager | DtoLicenseMgr object |
Return Values
result | DtoResult long value indicating the result of the method call. Use the Error property of the
DtoSession Object to obtain a description for the result. |
Remarks
ValidateLicenses returns only the result from
requesting a validation check. It does
not return any information about the state of the keys. You must separately call
GetProductInfo to get the XML string of product information that includes information about the state of the keys.
Example
’ instantiate session object and connect to server
Dim my_session as new DtoSession
Dim result as DtoResult
Dim my_licmgr as DtoLicenseMgr
result = my_session.Connect("myserver", "username", "password")
’ now obtain License Manager object
Set my_licmgr = my_session.LicenseMgr
’ initiate a validation check of all keys
result = my_licmgr.ValidateLicenses