SWbemNamedValueSet.Item method

The Item method of the SWbemNamedValueSet object gets an SWbemNamedValue object from the collection.

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

Syntax

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

Parameters

strName [in]

Required. Name of the value to retrieve.

iFlags [in, optional]

Reserved. This value must be zero if specified.

Return value

If successful, the requested SWbemNamedValue object is returned.

Error codes

Upon completion of the Item method, the Err object may contain one of the error codes in the following list.

wbemErrFailed - 2147749889 (0x80041001)

Unspecified error.

wbemErrInvalidParameter - 2147749896 (0x80041008)

An invalid parameter was specified, or the namespace could not be parsed.

wbemErrOutOfMemory - 2147749894 (0x80041006)

Not enough memory to complete the operation.

wbemErrNotFound - 2147749890 (0x80041002)

The requested item was not found.

Remarks

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

Requirements

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