Last modified: July 23, 2011
Applies to: Outlook
Provides detailed information about an error, typically generated by the operating system, MAPI, or a service provider.
The MAPIERROR structure is used to describe error information. Clients and service providers pass a pointer to a MAPIERROR structure in the lppMAPIError parameter of the IMAPIProp::GetLastError method. GetLastError returns information about the previous error that has occurred to an object. Callers of GetLastError free the memory for the MAPIERROR structure by calling MAPIFreeBuffer.
The lpszComponent member can be used to map the component's Help file, if one exists. Service providers should limit the size of the component string to 30 characters so that it can easily be displayed in a dialog box. The ulContext member can also be used to refer to an online Help topic for common errors.
Because service providers are not required to provide detailed error information, clients should not expect any of the members of the MAPIERROR structure that are returned to contain valid data. However, at a minimum MAPI strongly recommends that providers specify information in the lpszComponent and ulContext members.
For more information about error handling in MAPI, see Error Handling.