[This is preliminary documentation and subject to change.]
The IWbemServices::GetObject method locates an object by path.
This method retrieves an object, either a class definition or an instance, based on its path. This method only retrieves objects from the namespace associated with the current IWbemServices object.
HRESULT IWbemServices::GetObject(
[in] BSTR bstrObjectPath,
[in] LONG lFlags,
[in] IWbemContext *pCtx,
[out, OPTIONAL] IWbemClassObject **ppObject,
[out, OPTIONAL] IWbemCallResult **ppCallResult
);
WBEM_E_ACCESS_DENIED | The current user does not have permission to access the object. |
WBEM_E_FAILED | Other unspecified errors. |
WBEM_E_INVALID_PARAMETER | An invalid parameter was specified, or the namespace could not be parsed. |
WBEM_E_INVALID_PATH | The specified path was invalid. |
WBEM_E_NOT_FOUND | The requested object could not be found. |
WBEM_E_OUT_OF_MEMORY | There was not enough memory to complete the operation. |
WBEM_E_RPC_FAILURE | The RPC link between the client and CIMOM has failed. |
WBEM_NO_ERROR | The call succeeded. |
On failure, you can obtain any available information from the COM function GetErrorInfo.
Class Creation, Error Objects, IWbemCallResult, IWbemServices::GetObjectAsync, Object Paths