GetErrorInfo function

Obtains the error information pointer set by the previous call to SetErrorInfo in the current logical thread.

Syntax

HRESULT GetErrorInfo(
  ULONG      dwReserved,
  IErrorInfo **pperrinfo
);

Parameters

dwReserved

Reserved for future use. Must be zero.

pperrinfo

An error object.

Return value

This function can return one of these values.

Return code Description
S_OK
Success.
S_FALSE
There was no error object to return.

Remarks

This function returns a pointer to the most recently set IErrorInfo pointer in the current logical thread. It transfers ownership of the error object to the caller, and clears the error state for the thread.

Making a COM call that goes through a proxy-stub will clear any existing error object for the calling thread. A called object should not make any such calls after calling SetErrorInfo and before returning. The caller should not make any such calls after the call returns and before calling GetErrorInfo. As a rule of thumb, an interface method should return as soon as possible after calling SetErrorInfo, and the caller should call GetErrorInfo as soon as possible after the call returns.

Requirements

   
Target Platform Windows
Header oleauto.h
Library OleAut32.lib
DLL OleAut32.dll