Share via


SWbemObject.Derivation_ プロパティ

SWbemObject オブジェクトの Derivation_ プロパティには、参照されるインスタンスのクラス派生階層を記述する文字列の配列が含まれています。 配列の最初の要素は親クラスを定義し、最後の要素はダイナスティ クラスを定義します。 このプロパティは読み取り専用です。

この構文の説明については、「スクリプト API のドキュメント規則」を参照してください。

このプロパティは読み取り専用です。

構文

SWbemObject.Derivation_ As String

プロパティ値

次の VBScript サンプルでは、win32_logicaldisk のクラス階層を取得する方法について説明します。

on Error resume next

Set c = GetObject("winmgmts://./root/cimv2:win32_logicaldisk")
d = c.Derivation_

for x = LBound(d) to UBound(d)
 WScript.Echo d(x)
Next

if err <> 0 then
 WScript.Echo Err.Description
end if

次の Perl サンプルでは、win32_logicaldisk のクラス階層を取得する方法について説明します。

use strict;
use Win32::OLE;

my ($C, $D, @collection);

eval {$C = Win32::OLE->GetObject("winmgmts:{impersonationLevel=impersonate}!\\\\.\\root\\cimv2")->
  InstancesOf ("win32_logicaldisk") };
unless ($@) 
{
 @collection = in $C;
 eval {$D = $collection[0]->Derivation_();};
 print "\n";
 unless ($@) 
 {
  print map{"$_\n"} @{$D};
 }
 else
 {
  print STDERR Win32::OLE->LastError, "\n";
 }
}
else
{
 print STDERR Win32::OLE->LastError, "\n";
}

要件

要件
サポートされている最小のクライアント
Windows Vista
サポートされている最小のサーバー
Windows Server 2008
Header
Wbemdisp.h
タイプ ライブラリ
Wbemdisp.tlb
[DLL]
Wbemdisp.dll
CLSID
CLSID_SWbemObject
IID
IID_ISWbemObject