IWbemContext::SetValue

[This is preliminary documentation and subject to change.]

The IWbemContext::SetValue method creates or overwrites a named context value.

HRESULT SetValue(
  [in] BSTR bstrName, 
  [in] LONG lFlags,
  [in] VARIANT pValue
);
 

Parameters

bstrName
Cannot be NULL. It is a read-only pointer to a valid BSTR indicating the context value name.
lFlags
Reserved. It must be zero.
pValue
Must point to a valid VARIANT, which is treated as read-only. The value in the VARIANT becomes the named context value. An entire IWbemClassObject can be stored as well as a simple value by enclosing it in a VARIANT using the VT_DISPATCH type. The caller must execute QueryInterface on the IWbemClassObject, asking for IID_IDispatch, and use the returned pointer in the VARIANT.