GETERRORINFO

typedef void (*GETERRORINFO) (IUnknown* pIObjetWithError, REFIID IID_InterfaceWithError, BSTR *pstrErrInfo);

        As described in the class overview of CRtnInfo, all the classes except COPropSet use its members to record all the returned data from various methods, including a HRESULT value and an error message if available. A developer can define her or his own error message function to get errors instead of the provided default error function.

        To define a user's error function, a user must call the function SysFreeString to free a unicode string inside if the passed string, *pstrErrInfo, is not NULL. Otherwise, memory leak or disaster will happen.

Classes Reference