PRB: MAPI_E_BAD_CHARWIDTH When Passing MAPI_UNICODE To MAPI Functions (252627)
The information in this article applies to:
- Microsoft Extended Messaging Application Programming Interface (MAPI)
This article was previously published under Q252627 SYMPTOMS
The documentation for many MAPI functions states that MAPI_UNICODE is an acceptable flag, yet some functions, such as the MAPIAdminProfiles function, return MAPI_E_BAD_CHARWIDTH if this flag is used.
CAUSE
The documentation for these MAPI functions only requires that they accept MAPI_UNICODE as a flag, not that they implement Unicode. Functions that return MAPI_E_BAD_CHARWIDTH do not support Unicode. All strings passed in and out of these functions must be ANSI strings.
RESOLUTION
If a MAPI function returns MAPI_E_BAD_CHARWIDTH when MAPI_UNICODE is passed, do not pass this flag. All Unicode strings must be converted to ANSI before being passed to these functions, and all strings returned are not ANSI.
STATUS
This behavior is by design.
MORE INFORMATION
The MultiByteToWideChar and WideCharToMultiByte functions can prove useful when using non-Unicode MAPI functions in a Unicode program.
Modification Type: | Minor | Last Reviewed: | 8/25/2005 |
---|
Keywords: | kbMsg kbprb KB252627 |
---|
|