DWbemClassObject.Get

[This is preliminary documentation and subject to change.]

The DWbemClassObject.Get method retrieves the specified property value, if it exists. This method also can return system properties.

DWbemClassObject.Get(
  [in] Name As String,
  [in] lFlags As Long,
  [out, OPTIONAL] pVal  As VARIANT , 
  [out, OPTIONAL] pvtType  As VARIANT ,  
  [out, OPTIONAL] plFlavor  As Long  
) As Long
 

Parameters

Name
String containing the desired property name.
lFlags
Reserved. It must be zero.
pVal
Receives the returned property value, if found. The pVal parameter can be NULL if a property value is not required. If an error code is returned, the VARIANT in pVal is left unmodified.
pvtType
Can be NULL. If not NULL, receives the CIM type of the property.
plFlavor
Can be NULL. If not NULL, the Long value receives information on the origin of the property:
WBEM_FLAVOR_ORIGIN_LOCAL
The property belongs to the derived-most class.
WBEM_FLAVOR_ORIGIN_PROPAGATED
The property was inherited from a parent class.
WBEM_FLAVOR_ORIGIN_SYSTEM
The property is a standard system property.

Return Values

WBEM_E_FAILED Unspecified error.
WBEM_E_NOT_FOUND The specified property was not found.
WBEM_E_OUT_OF_MEMORY There was not enough memory to complete the operation.
WBEM_NO_ERROR Success.

Remarks

If the underlying type of the property is an object path, a date/time string, or another special type, the returned values do not contain enough information to identify the true type. In applications that are not aware of the true property type ahead of time, the CIMTYPE qualifier for the specified property must be retrieved using DWbemClassObject.GetPropertyQualifierSet.

It is important to note that when creating a new object using DWbemClassObject.SpawnInstance, some system properties are not set until the object has been written to CIMOM. In all cases, DWbemClassObject.Get returns the requested system property, but the return value can be NULL.

See Also

DWbemClassObject.GetPropertyQualifierSet, System Classes, Properties, and Qualifiers