Distributed Tuning Objects Guide (v11)

DtoLicenseMgr オブジェクト

「DTO2」 のみ: このオブジェクトを使用すれば、製品ライセンスの適用(認証)と削除(認証解除)、ライセンス検証操作の開始、および製品情報の XML 文字列の取得が行えます。

プロパティ

なし

コレクション

なし

メソッド

AddLicense

DeleteLicense

GetProductInfo

ValidateLicenses

備考

Session オブジェクトから取得します。

'セッション オブジェクトのインスタンスを作成し、サーバーに接続する 
Dim my_session as new DtoSession 
Dim result as DtoResult 
Dim my_licmgr as DtoLicenseMgr 
 
result = my_session.Connect("myserver", "username", 
"password") 
 
'License Manager オブジェクトを取得する 
Set my_licmgr = my_session.LicenseMgr 
 
'ライセンスを追加する 
 
result = 
my_licmgr.AddLicense("ERXVD3U4ZS9KR94QPDHV5BN2") 

関連項目

DtoSession オブジェクト

メソッドの詳細

AddLicense

ライセンスを適用します。

構文

result = LicenseManager.AddLicense(License) 

引数

LicenseManager
DtoLicenseMgr オブジェクト
License
DtoSession オブジェクトを使って現在接続しているエンジンに適用する有効なライセンス キー。

戻り値

result
メソッド呼び出しの結果を示す DtoResult(Long 型の値)。DtoSession オブジェクトの Error プロパティを使って結果の説明を取得します。

'セッション オブジェクトのインスタンスを作成し、サーバーに接続する 
Dim my_session as new DtoSession 
Dim result as DtoResult 
Dim my_licmgr as DtoLicenseMgr 
 
result = my_session.Connect("myserver", "username", 
"password") 
 
'License Manager オブジェクトを取得する 
Set my_licmgr = my_session.LicenseMgr 
 
'ライセンスを追加する 
 
result = 
my_licmgr.AddLicense("ERXVD3U4ZS9KR94QPDHV5BN2") 

DeleteLicense

ライセンスを削除します。

構文

result = LicenseManager.DeleteLicense(License) 

引数

LicenseManager
DtoLicenseMgr オブジェクト
License
DtoSession オブジェクトを使って現在接続しているエンジンから削除する有効なライセンス キー。

戻り値

result
メソッド呼び出しの結果を示す DtoResult(Long 型の値)。DtoSession オブジェクトの Error プロパティを使って結果の説明を取得します。

備考

なし

'セッション オブジェクトのインスタンスを作成し、サーバーに接続する 
Dim my_session as new DtoSession 
Dim result as DtoResult 
Dim my_licmgr as DtoLicenseMgr 
 
result = my_session.Connect("myserver", "username", 
"password") 
 
'License Manager オブジェクトを取得する 
Set my_licmgr = my_session.LicenseMgr 
 
'ライセンスを削除する 
 
result = 
my_licmgr.DeleteLicense("ERXVD3U4ZS9KR94QPDHV5BN2") 

GetProductInfo

License Manager で検出されたすべての Pervasive Software 製品の一覧を取得します。

構文

result = LicenseManager.GetProductInfo 

引数

LicenseManager
DtoLicenseMgr オブジェクト

戻り値

result
製品の一覧を XML 形式の文字列で返します。

備考

なし

'セッション オブジェクトのインスタンスを作成し、サーバーに接続する 
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

セッション接続によって示されるコンピューターのすべてのキーに関する有効性のチェックを開始します。

構文

result = LicenseManager.ValidateLicenses 

引数

LicenseManager
DtoLicenseMgr オブジェクト

戻り値

result
メソッド呼び出しの結果を示す DtoResult(Long 型の値)。DtoSession オブジェクトの Error プロパティを使って結果の説明を取得します。

備考

ValidateLicenses は、検証チェック要求から生じた結果のみを返します。キーの状態に関する情報は何も返しません。キーの状態に関する情報も含め、製品情報の XML 文字列を取得するには、別に GetProductInfo を呼び出す必要があります。

'セッション オブジェクトのインスタンスを作成し、サーバーに接続する 
Dim my_session as new DtoSession 
Dim result as DtoResult 
Dim my_licmgr as DtoLicenseMgr 
 
result = my_session.Connect("myserver", "username", 
"password") 
 
'License Manager オブジェクトを取得する 
Set my_licmgr = my_session.LicenseMgr 
 
'すべてのキーの検証チェックを開始する 
result = my_licmgr.ValidateLicenses 

DtoCategory オブジェクト

DtoSettings コレクション