Microsoft KB Archive/252627

From BetaArchive Wiki
< Microsoft KB Archive
Revision as of 16:15, 18 July 2020 by 3155ffGd (talk | contribs) (importing KB archive)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Knowledge Base


Article ID: 252627

Article Last Modified on 8/25/2005



APPLIES TO

  • Microsoft Messaging Application Programming Interface



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.

Keywords: kbmsg kbprb KB252627