[This is preliminary documentation and subject to change.]
The IWbemContext::GetNames method returns a SAFEARRAY of all of the names of the named context values. After all the names are known, GetValue can be called on each name to retrieve the value. This technique is a way of accessing the context values that is different from calling the BeginEnumeration, Next, and EndEnumeration methods.
HRESULT GetNames(
[in] LONG lFlags,
[out] SAFEARRAY (BSTR) *pbstrNames
);
Note If there are no named values in the object, the call succeeds and returns an array of length zero.
WBEM_E_INVALID_PARAMETER | An invalid parameter was specified, or the namespace could not be parsed. |
WBEM_E_OUT_OF_MEMORY | There was not enough memory to complete the operation. |
WBEM_NO_ERROR | Success. |
IWbemContext::GetValue, IWbemContext::BeginEnumeration