The IABLogon::GetLastError method returns a MAPIERROR structure containing information about the previous address book provider error.
See IABLogon : IUnknown.
HRESULT GetLastError(
HRESULT hResult,
ULONG ulFlags,
LPMAPIERROR FAR * lppMAPIError
);
Address book providers implement the IABLogon::GetLastError method to supply information about a prior method call that failed. Callers can provide their users with detailed information about the error by including the data from the MAPIERROR structure in a dialog box.
You can make use of the MAPIERROR structure pointed to by the lppMAPIError parameter — if the address book provider supplies one — only if GetLastError returns S_OK. Sometimes the address book provider cannot determine what the last error was or has nothing more to report about the error. In this situation, the address book provider returns a pointer to NULL in lppMAPIError instead.
For more information about the GetLastError method, see Using Extended Errors.