Редагувати

Поділитися через


__PARAMETERS class

The __PARAMETERS system class is an abstract class that defines the input and output parameters for methods. It is also used to pass input and output parameter values between a WMI client and a method provider.

The following syntax is simplified from Managed Object Format (MOF) code and includes all inherited properties. Properties are listed in alphabetic order, not MOF order.

Syntax

[abstract]
class __PARAMETERS
{
};

Members

The __PARAMETERS class does not define any members.

Remarks

To define a method in a user class, a WMI client creates a copy of the __PARAMETERS class, and adds a property for each input parameter in a method. If the method contains a return value or output parameters, another copy of __PARAMETERS must be created. If the method returns a return value, the client must add a property named ReturnValue. The method provider then stores the method parameters with a call to IWbemClassObject::PutMethod.

To invoke a method, a client calls the following in sequence:

  1. IWbemClassObject::GetMethod to retrieve a copy of the __PARAMETERS class that is stored by IWbemClassObject::PutMethod.
  2. IWbemClassObject::SpawnInstance, and then sets one property for each input parameter to the method.
  3. IWbemServices::ExecMethod or IWbemServices::ExecMethodAsync to execute the method.

After the method is finished executing, another __PARAMETERS class instance may be returned if the method has output parameters or a return value.

Requirements

Requirement Value
Minimum supported client
Windows Vista
Minimum supported server
Windows Server 2008
Namespace
All WMI namespaces

See also

WMI System Classes

IWbemServices::ExecMethodAsync

Calling a Method