CreateErrorInfo function

Creates an instance of a generic error object.

Syntax

HRESULT CreateErrorInfo(
  ICreateErrorInfo **pperrinfo
);

Parameters

pperrinfo

A system-implemented generic error object.

Return Value

This function can return one of these values.

Return code Description
S_OK
Success.
E_OUTOFMEMORY
Could not create the error object.

Remarks

This function returns a pointer to a generic error object, which you can use with QueryInterface on ICreateErrorInfo to set its contents. You can then pass the resulting object to SetErrorInfo. The generic error object implements both ICreateErrorInfo and IErrorInfo.

Requirements

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

See Also

Error-Handling API Functions