IMAPISupport::GetLastError
Office 2013
Published: July 16, 2012
Returns a MAPIERROR structure that contains information about the previous support object error.
HRESULT GetLastError( HRESULT hResult, ULONG ulFlags, LPMAPIERROR FAR * lppMAPIError );
You can use the pointer to the MAPIERROR structure, if MAPI supplies one, in the lppMAPIError parameter only if GetLastError returns S_OK. Sometimes MAPI cannot determine what the last error was or it has nothing more to report about the error. In this situation, lppMAPIError returns a pointer to NULL instead.
For more information about the GetLastError method, see MAPI Extended Errors.
To release all the memory allocated by MAPI, call the MAPIFreeBuffer function for the returned MAPIERROR structure.