CreateErrorInfo

This function creates an instance of a generic error object.

HRESULT CreateErrorInfo(
  ICreateErrorInfo** pperrinfo 
); 

Parameters

  • pperrinfo
    [in] Pointer to a pointer to a system-implemented generic error object.

Return Values

The function returns the HRESULT S_OK if it is successful and it returns E_OUTOFMEMORY if it 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.

Example

ICreateErrorInfo *perrinfo;
HRESULT hr;
hr = CreateErrorInfo(&pcerrinfo);

Passing invalid (and under some circumstances NULL) pointers to this function causes an unexpected termination of the application.

Requirements

OS Versions: Windows CE 2.0 and later.
Header: Oleauto.h.
Link Library: Oleaut32.lib.

See Also

SetErrorInfo

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.