SWbemObjectSet.Item method

The Item method of the SWbemObjectSet object gets an SWbemObject from the collection.

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

Syntax


objWbemObject = .Item( _
  ByVal strObjectPath _
)

Parameters

strObjectPath

Required. Relative path of the object to retrieve from the collection. Example: Win32_LogicalDisk="C:"

Return value

If successful, the requested SWbemObject object returns.

Error codes

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

Error (Name/Dec/Hex)Meaning
wbemErrFailed
2147749889 (0x80041001)

Unspecified error.

wbemErrInvalidParameter
2147749896 (0x80041008)

Invalid parameter was specified.

wbemErrOutOfMemory
2147749894 (0x80041006)

Not enough memory to complete the operation.

wbemErrNotFound
2147749890 (0x80041002)

Requested item was not found.

Remarks

The Item method can require a lot of processor time because complete enumeration by the provider of the elements of the set is required to return the result.

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2003

Type library

Wbemdisp.tlb

DLL

Wbemdisp.dll

 

 

Show:
© 2015 Microsoft