IMimeBodyW interface

Posted on 2006-04-05
Last Modified: 2013-11-20
I want to use the unicode versions for IMimeMessage, IMimeBody etc.. (IMimeMessageW, IMimeBodyW)..but I wasn't able to find them in mimeole.h header. I'm wondering if I have to update this header and the corresponding idl file and if is so from where should I update them?

Question by:sparkythedog
    LVL 86

    Accepted Solution

    According to the docs (see e.g., these interface already work with UNICODE:

          #define SZ_TEXT_BODY L" Hi!!!\n\n\n -BryanSt"
          pStreamTemp = SHCreateMemStream((BYTE *)SZ_TEXT_BODY,
          if (pStreamTemp)
             hr = pMessage->SetTextBody(TXT_PLAIN, IET_UNICODE, hBody,
                                                   pStreamTemp, NULL);
          hr = pMessage->Commit(0);

    All you need to do is setting 'ietEncoding' to 'IET_UNICODE'.

    Author Comment

    The thing is I have to get the name of the attached file and I'm using the following method:

    LPSTR pstrAttachName;
    pMimeBody->GetDisplayName( &pstrAttachName )

    if the attached filename contains unicode characters, the pstrAttachName will contain this: ??????.jpg and not the unicode characters.

    The project is compiled for UNICODE.

    LVL 86

    Expert Comment

    That probably is related to you locale.

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
    Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
    This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now