[This is preliminary documentation and subject to change.]
The DWbemClassObject.GetNames method retrieves the names of all of the properties in the object. Depending on user-supplied selection criteria, furthermore, it can retrieve a subset of the properties. You can retrieve these properties by using DWbemClassObject.Get for each name. This method can also return system properties.
DWbemClassObject.GetNames(
[in] QualifierName As String,
[in] lFlags As Long,
[in] pQualifierVal As VARIANT,
[out] pNames() As String
) As Long
WBEM_E_FAILED | Unspecified error. |
WBEM_E_INVALID_PARAMETER | One or more parameters were invalid, or an incorrect combination of flags and parameters was specified. |
WBEM_E_OUT_OF_MEMORY | There was not enough memory to complete the task. |
WBEM_NO_ERROR | Success. |
The names returned are controlled by a combination of flags and parameters. For example, all names of all properties can be specified, or only the key properties, and so on. The lFlags parameter specifies the primary filter, and the other parameters vary depending on the value of lFlags. For example, if WBEM_FLAG_ONLY_IF_IDENTICAL is specified then a value must be specified for QualifierName and pQualifierVal.
The flag values are bit fields, and can be combined. You can combine one flag from each of the following groups with a flag from each of the other groups. Flag values within a group are mutually exclusive.
It is not an error for an empty list, that is, an array of zero elements, to be returned in situations where no properties match the specified filters.
DWbemClassObject.Get, System Properties, DWbemClassObject.BeginEnumeration