UNICODE Support in WAB

New applications should not use this set of interfaces. These interfaces exist for backward compatibility with legacy applications. These interfaces will be unavailable in the future.

Note  In Windows Vista, Windows Contacts replaces Windows Address Book (WAB). For more information about this new mechanism for storing and retrieving contact information, see Windows Contacts.

Versions 5.0 and later of the WAB support UNICODE.

Methods that Support UNICODE Strings

The following methods and structures exhibit some level of support for UNICODE:

LDAPUrl The lpszURL parameter of this method is of type LPSTR. You can pass a LPWSTRURL into this method by casting it to an LPSTR and setting the ulFlags parameter to MAPI_UNICODE. Upon seeing the flag, the WAB casts the URL to an LPWSTR prior to using it.
ContextMenu and Property Sheet ExtensionsThe lpsz member of the WABEXTDISPLAY structure is defined to be type LPTSTR. If this member contains a wide string, ulFlags in the structure contains MAPI_UNICODE. If ulFlags does not contain MAPI_UNICODE then this string is a LPSTR and must be cast as such before using.
IPropObject::GetPropsIf caller specifies MAPI_UNICODE as the flag, the returned property array contains all wide strings. Corresponding property tags are of type PT_UNICODE and PT_MV_UNICODE.
IPropObject::GetPropListIf caller specifies MAPI_UNICODE, the returned prop list shows strings of type PT_UNICODE and PT_MV_UNICODE instead of PT_STRING8 and PT_MV_STRING8.
Address If the caller sets the ulFlags member to contain MAPI_UNICODE, then all the strings in the ADRPARM structure are assumed to be of type LPWSTR. Otherwise, they are assumed to be of type LPSTR. If MAPI_UNICODE is specified, then all strings passed in and returned by the ADRLIST are in UNICODE; otherwise, the strings are ANSI/DBCS.
Details Specifying MAPI_UNICODE has no effect on this method, since the lpszButtonText parameter is the only parameter affected by the UNICODE flag and this parameter is ignored within the WAB.
CreateOneOff Specify MAPI_UNICODE if the strings being passed in are in UNICODE. Absence of the flag means that the strings are ANSI/DBCS.
ResolveName Specify WAB_RESOLVE_UNICODE (not MAPI_UNICODE) if all strings in the ADRLIST are in UNICODE. The returned strings are in UNICODE. Otherwise, all in and out strings are ANSI/DBCS.
ResolveNames Specify MAPI_UNICODE for UNICODE strings; specify 0 for ANSI/DBCS strings.
GetContentsTable GetContentsTable Specify MAPI_UNICODE to ensure that all strings in the table are UNICODE; otherwise, all strings will be ANSI/DBCS.
GetSearchPath Specify MAPI_UNICODE for UNICODE strings, 0 for ANSI/DBCS.




Send comments about this topic to Microsoft

Build date: 6/30/2010

Community Additions