Partager via


IErrorlog::AddError

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This method uses an EXCEPINFO structure to log an error in the error log for a named property.

Syntax

HRESULT AddError(
  LPCOLESTR pszPropName,
  EXCEPINFO* pExcepInfo
);

Parameters

  • pszPropName
    [in] Pointer to a string containing the name of the property involved with the error. This cannot be NULL.
  • pExcepInfo
    [in] Pointer to the caller-initialized EXCEPINFO structure that describes the error to log. This cannot be NULL.

Return Value

The following table shows the return values.

Value Description

S_OK

The error was logged successfully.

E_FAIL

There was a problem logging the error.

E_OUTOFMEMORY

There was not enough memory to log the error.

E_POINTER

The pointer in pszPropName or pExcepInfo is not valid (such as NULL). The caller must supply both.

Remarks

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

Requirements

Header oaidl.h, oaidl.idl
Library oleaut32.lib, uuid.lib
Windows Embedded CE Windows CE .NET 4.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

IErrorlog
EXCEPINFO