CreateErrorInfo

HRESULT CreateErrorInfo(

ICreateErrorInfo  **pperrinfo  
);
 

Creates an instance of a generic error object.

Parameter

pperrinfo
Pointer to a system-implemented generic error object.

Return Value

The return value obtained from the returned HRESULT is one of the following:

Return value Meaning
S_OK Success.
E_OUTOFMEMORY Could not create the error object.

Comments

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.

Example

ICreateErrorInfo *perrinfo;
HRESULT hr;

hr = CreateErrorInfo(&pcerrinfo);

QuickInfo

  Windows NT: Use version 3.1 and later.
  Windows: Use Windows 95 and later.
  Header: Declared in oleauto.h.
  Import Library: Link with oleaut32.lib.