I am having a problem using CDO 1.21 to get messages in Asian languages. It seems that 
CDO doen't return UNICODE string. I have tried to use MAPI instead and it works fine.
We are using Exchange Server 5.5 (SP3) running on Windows NT platform.
I have included the code that I am using below.
If you know what the problem might be, please let me know ASAP.

Thanks a lot in advance....


#import "cdo.dll"

void TestCDO()
{
        CoInitialize(NULL);

        try
        {
                MAPI::_SessionPtr pSession("MAPI.Session");

                pSession->Logon();

                MAPI::FolderPtr     pFolder = pSession->Inbox;
                MAPI::MessagesPtr   pMessages = pFolder->Messages;
                MAPI::MessagePtr    pMessage = pMessages->GetFirst();

                while (pMessage!=NULL)
                {
                        MAPI::FieldsPtr pFields = pMessage->Fields;
                        long    index = (long)MAPI::CdoPR_SUBJECT_W;
                        _bstr_t pSubject = pFields->GetItem(index);

                        // Display the Subject Name.
                        AfxMessageBox(pSubject);

                        pMessage = pMessages->GetNext();
                }

                pSession->Logoff();
        }
        catch (_com_error &e)
        {
                AfxMessageBox(e.ErrorMessage());
        }

        CoUninitialize();
}

_________________________________________________________________
List posting FAQ:       http://www.swinc.com/resource/exch_faq.htm
Archives:               http://www.swynk.com/sitesearch/search.asp
To unsubscribe:         mailto:[EMAIL PROTECTED]
Exchange List admin:    [EMAIL PROTECTED]

Reply via email to