SWbemNamedValueSet.Add method

The Add method of the SWbemNamedValueSet object adds an SWbemNamedValue object to the collection. If an element already exists in the collection with the same name, the new element replaces it.

For an explanation of this syntax, see Document Conventions for the Scripting API.

Syntax

objNamedValue = .Add( _
  ByVal strName, _
  ByVal varVal, _
  [ ByVal iFlags ] _
)

Parameters

strName [in]

Required. Name of the new value.

varVal [in]

Required. Variant that represents the new value.

iFlags [in, optional]

Reserved and must be set to zero if specified.

Return value

If successful, this method returns the newly modified or newly created SWbemNamedValue object.

Remarks

For examples of adding and retrieving named values, see SWbemNamedValue.Value.

Requirements

Requirement Value
Minimum supported client
Windows Vista
Minimum supported server
Windows Server 2008
Header
Wbemdisp.h
Type library
Wbemdisp.tlb
DLL
Wbemdisp.dll
CLSID
CLSID_SWbemNamedValueSet
IID
IID_ISWbemNamedValueSet

See also

SWbemNamedValueSet