MAPIERROR
The MAPIERROR
structure provides detailed information about an error, typically generated by
the operating system, MAPI, or a service provider.
Quick Info
Header
file: |
MAPIDEFS.H |
typedef struct _MAPIERROR
{
ULONG ulVersion;
LPTSTR
lpszError;
LPTSTR lpszComponent;
ULONG ulLowLevelError;
ULONG ulContext;
} MAPIERROR, FAR * LPMAPIERROR;
Members
ulVersion
Version
number of the structure. The ulVersion member should be set to
MAPI_ERROR_VERSION, which is currently defined as zero.
lpszError
Pointer to a
string describing the error.
lpszComponent
Unallocated
constant string that describes the component generating the error.
ulLowLevelError
Low-level
error value used only when the error to be returned is low-level.
ulContext
Error
location within the lpszComponent member. If there is a Help file for
this component, ulContext is a Help file context identifier; otherwise,
it specifies a unique numeric identifier.
Remarks
The MAPIERROR
structure is used to describe error information. Clients and service providers
pass a pointer to a MAPIERROR structure in the lppMAPIError
parameter to the IMAPIProp::GetLastError
Callers of GetLastError
free the memory for the MAPIERROR structure by calling MAPIFreeBuffer.
Service
providers implementing GetLastError are not required to provide any
detailed error information in the MAPIERROR structure. However, placing
an error message string in the lpszError member is strongly recommended.
The component name and context members are optional.
The ulContext
member primarily identifies the point in the code where the error occurred.
This assists support personnel and developers in tracking and isolating
problems. It can also be used to refer to an online Help topic for common
errors.
For more
information about error handling in MAPI, see Error Handling
See Also