The Automation DLL maintains one error object per thread. Because the consumer is not required to retrieve the error object, the Automation DLL might be holding the error object generated by a previous method when a new method is called. Thus, components that return error objects must call the SetErrorInfo function with a null pointer at the start of each method in an interface that can generate error objects. This clears the current error object on the thread and ensures that any error object available after the method returns applies to the current method.