次の方法で共有


ManagementClass.Derive メソッド

このクラスから新しいクラスを派生させます。

Public Function Derive( _
   ByVal newClassName As String _) As ManagementClass
[C#]
public ManagementClass Derive(stringnewClassName);
[C++]
public: ManagementClass* Derive(String* newClassName);
[JScript]
public function Derive(
   newClassName : String) : ManagementClass;

パラメータ

  • newClassName
    派生する新しいクラスの名前。

戻り値

元のクラスから派生した新しい WMI クラスを表す新しい ManagementClass

解説

新しく返されたクラスは、 Put () メソッドを明示的に呼び出すまでコミットされないことに注意してください。

使用例

 
ManagementClass existingClass = new ManagementClass("CIM_Service");
               ManagementClass newClass = existingClass.Derive("My_Service");
               newClass.Put(); //to commit the new class to the WMI repository.
               
[Visual Basic] 
Dim existingClass As New ManagementClass("CIM_Service")
Dim newClass As ManagementClass

newClass = existingClass.Derive("My_Service")
newClass.Put()  'to commit the new class to the WMI repository.
   

[C++, JScript] C++ および JScript のサンプルはありません。Visual Basic および C# のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン 言語のフィルタ をクリックします。

必要条件

プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ

.NET Framework セキュリティ:

参照

ManagementClass クラス | ManagementClass メンバ | System.Management 名前空間