SWbemLastError.Path_ property

The Path_ property of the SWbemLastError object returns an SWbemObjectPath object that represents the object path of the current class or instance. This property can be passed as a parameter to methods that require an object path.

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

This property is read-only.

Syntax

SWbemLastError.Path_ As Object

Property value

Remarks

Only the Class property of the returned SWbemObjectPath instance can be modified. If you try to modify any other property, or try to call the SetAsClass or SetAsSingleton methods, you get an error of wbemErrReadOnly.

Because of this, you cannot modify the SWbemNamedValueSet object that is the value of the Keys property of the returned SWbemObjectPath instance. If you try to call the Add, Remove, or DeleteAll methods on this value, you get a wbemErrReadOnly error. Furthermore, you cannot modify any SWbemNamedValue obtained from this collection. Attempts to modify the Value property return the same error code.

However, if you call SWbemObject.Clone_ to create a copy, the Path_ property of the copy is fully modifiable.

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_SWbemLastError
IID
IID_ISWbemLastError