Mailbox names which contain non-ASCII characters must be converted
to a modified version of UTF-7 encoding as defined by the IMAP4
protocol. This encoding allows applications to reference mailbox names
which contain Unicode characters and provides support for languages
other than English. This method is used to convert a UTF-7 encoded
mailbox name using the current locale, primarily for display purposes.
For example, if the lpszMailboxName parameter specifies the string
"&A5QDvwO6A7kDvAOu-", this method will convert it
to the Greek word "Δοκιμή"
and return that value in the lpszDecodedName buffer. It is recommended
you use the Unicode version of this method whenever possible to ensure
the mailbox name is decoded correctly.
If the application is not built using Unicode, the decoded mailbox name
will be converted using the code page specified by the nCodePage
parameter. If the code page does not support the characters used in the
mailbox name, this can result in an incorrect conversion.
This method should not be used to convert strings between Unicode
and UTF-7. The encoding format is specifically intended for use with
the IMAP4 protocol and should never be used for general purpose encoding
or decoding. If you need to convert a UTF-7 encoded string to Unicode,
use the Win32 API function MultiByteToWideChar.