Bagikan melalui


AddError method

Logs an error (using an EXCEPINFO structure) in the error log for a named property.

Syntax

HRESULT retVal = object.AddError(pszPropName, pExcepInfo);

Parameters

  • pszPropName [in]
    Type: LPCOLESTR

    A pointer to a string containing the name of the property involved with the error. This cannot be NULL.

  • pExcepInfo [in]
    Type: EXCEPINFO

    A pointer to the caller-initialized EXCEPINFO structure that describes the error to log. This cannot be NULL.

Remarks

E_NOTIMPL is not a valid return code because this is the only method for the IErrorlog interface.