[This is preliminary documentation and subject to change.]
The DIWbemQualifierSet.Put method writes the named qualifier and value. If the qualifier does not exist, the method creates one. When the method creates a new qualifier, it overwrites a previously existing value of the same name.
In some situations, it is not possible to write the value of a qualifier if the qualifier was propagated from another object. Propagated qualifiers are generally read-only, but can be overridden in some situations. See Qualifier Flavors.
When writing the key qualifier, it is not necessary to specify any flavors or propagation rules.
DIWbemQualifierSet.Put(
[in] Name As String,
[in] pVal As VARIANT ,
[in] lFlavor As Long,
) As Long
WBEM_E_CANNOT_BE_KEY | There was an illegal attempt to specify a key qualifier on a property that cannot be a key. The class definition specifies the keys for an object. It cannot be altered on a per-instance basis. |
WBEM_E_INVALID_PARAMETER | An invalid parameter was specified, or the namespace could not be parsed. |
WBEM_E_INVALID_QUALIFIER_TYPE | The pVal parameter is not of a legal qualifier type. |
WBEM_E_OVERRIDE_NOT_ALLOWED | It is not possible to perform the DIWbemQualifierSet.Put operation on this qualifier, because the owning object does not permit overrides. |
WBEM_NO_ERROR | Success. |