Creating Parameters Objects in C++
The following procedure describes how to create an instance of the __PARAMETERS system class to hold parameter information.
To create an instance of __PARAMETERS
Determine the class path for the class containing the method definition.
Populate the class instance by setting the properties that correspond to the output values and, if there is a return value for the method, the ReturnValue property.
After a method provider determines that the input parameters are correct, the method pointed to by strMethodName might still pass or fail. Some method providers spawn a second thread to implement the method so that the method's actual success or failure ends up being reported to the caller through IWbemObjectSink::SetStatus. Note that IWbemObjectSink::SetStatus does not receive the return code of the provider method. However, it receives the return code of the actual call-return mechanism, and is only useful for verifying that the call occurred or that it failed for mechanical reasons.