IWbemCallResult::GetResultString

[This is preliminary documentation and subject to change.]

The IWbemCallResult::GetResultString method returns the assigned object path of an instance newly created by IWbemServices::PutInstance.

Note  The call result object is primarily used when the PutInstance call is carried out by a provider and the client needs to know the object path (the values of the key properties) assigned the provider.  For example, if the the key property to the class is a GUID and is assigned by the provider during the PutInstance operation, the client would have no way of knowing this GUID unless the provider was able to return it in this way.

HRESULT GetResultString(
  [in] Long lTimeout,
  [out] BSTR *pbstrResultString
);
 

Parameters

lTimeout
Specifies the maximum time in milliseconds you must wait for the call to return. If you use the Win32® constant INFINITE (0xFFFFFFFF), the call will block until the object path is available. If you use zero, the call immediately returns either the object path or a status code.
pbstrResultString
Cannot be NULL. This parameter receives a pointer to the object path, which, in turn, leads to the newly created object. The returned string must be deallocated using the system call SysFreeString. On error, a new string is not returned.

Return Values

WBEM_NO_ERROR The object path was retrieved.
WBEM_S_PENDING The call has not yet completed.
WBEM_E_UNEXPECTED An internal failure occurred.
WBEM_E_TRANSPORT_FAILURE The remote connection to CIMOM has failed.
WBEM_E_ACCESS_DENIED The caller attempted an unauthorized operation.
WBEM_E_INVALID_PARAMETER An invalid parameter was specified, or the namespace could not be parsed.

On error, you can call the COM function GetErrorInfo to obtain more error information.

See Also

IWbemServices::PutInstance