Skip to content

Latest commit

 

History

History
117 lines (77 loc) · 2.82 KB

swbemobject-derivation-.md

File metadata and controls

117 lines (77 loc) · 2.82 KB
description ms.assetid ms.tgt_platform title ms.topic ms.date topic_type api_name api_type api_location
The Derivation\_ property of the SWbemObject object contains an array of strings that describe the class derivation hierarchy for the instance being referenced.
8a4daab0-7d10-4a37-aacd-1f3f499b859a
multiple
SWbemObject.Derivation_ property (Wbemdisp.h)
reference
05/31/2018
APIRef
kbSyntax
SWbemObject.Derivation_
ISWbemObject.Derivation_
ISWbemObject.get_Derivation_
COM
Wbemdisp.dll

SWbemObject.Derivation_ property

The Derivation_ property of the SWbemObject object contains an array of strings that describe the class derivation hierarchy for the instance being referenced. The first element in the array defines the parent class and the last element defines the dynasty class. This property is read-only.

For an explanation of this syntax, see Document Conventions for the Scripting API.

This property is read-only.

Syntax

SWbemObject.Derivation_ As String

Property value

Examples

The following VBScript sample describes how to retrieve the class hierarchy for 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

he following Perl sample describes how to retrieve the class hierarchy for 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";
}

Requirements

Requirement Value
Minimum supported client
Windows Vista
Minimum supported server
Windows Server 2008
Header
Wbemdisp.h
Type library
Wbemdisp.tlb
DLL
Wbemdisp.dll
CLSID
CLSID_SWbemObject
IID
IID_ISWbemObject