Platform SDK: Windows Management Instrumentation |
The IWbemContext::GetValue method is used to retrieve a specific named context value by name.
HRESULT GetValue( LPCWSTR strName, LONG lFlags, VARIANT *pValue );
It is possible that an entire IWbemClassObject object can be returned inside the VARIANT. If that is the case, then VT_UNKNOWN is the VARIANT type. The caller can take the IUnknown pointer and execute QueryInterface to obtain the IWbemClassObject pointer.
This method returns an HRESULT object that indicates the status of the method call.
Value | Meaning |
---|---|
WBEM_E_NOT_FOUND | The requested value was not found. |
WBEM_E_INVALID_PARAMETER | An invalid parameter was specified. |
WBEM_E_OUT_OF_MEMORY | There was not enough memory to complete the operation. |
WBEM_S_NO_ERROR | The call succeeded. |
Windows NT/2000: Requires Windows NT 4.0 SP4 or later.
Windows 95/98: Requires Windows 95 or later (with DCOM).
Header: Declared in Wbemcli.h; include Wbemidl.h.
Library: Use Wbemuuid.lib.