HRESULT CreateErrorInfo(
ICreateErrorInfo **pperrinfo
);
Creates an instance of a generic error object.
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. |
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.
ICreateErrorInfo *perrinfo;
HRESULT hr;
hr = CreateErrorInfo(&pcerrinfo);
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.