If the input buffer can be successfully decoded, the return value is the
length of the decoded output string. If the function returns zero,
then no text was decoded and the output string buffer will be empty.
If the function fails, the return value is MIME_ERROR. To get
extended error information, call MimeGetLastError.
This function provides a means to decode text that was previously
encoded using either base64 or quoted-printable encoding. In most
cases, it is not necessary to use this function because the message
parser will automatically decode the message text if necessary.
This function and the MimeEncodeText function use
the UTF-8 character set. If the Unicode version of this function is
called, the output text will be decoded as UTF-8, then converted to
UTF-16 and returned to the caller. If the ANSI version of this
function is used, the decoded output will always be returned to the
caller using the UTF-8 character set.
If an unsupported encoding type is specified, this function will
return MIME_ERROR and the output text string will be empty. In most
cases, it is preferable to use MIME_ENCODING_BASE64 as the encoding
method, with quoted-printable encoding only used for legacy support.
If the original text was encoded using a different character set,
use the MimeDecodeTextEx function, which enables you to
specify an alternate character set.