IMAPIProp::GetProps and MAPI_UNICODE flag RRS feed

  • Question

  • Hi,

    I am reading the document for GetProps at and try to understand the MAPI_UNICODE flag.

    However, I find a problem. If I pass PR_DISPLAY_NAME_A as one of the property tag in lpPropTagArray parameter, and then pass MAPI_UNICODE to the GetProps function as well. Then what property value will I get from the function?

    Is it an ANSI string or UNICODE string?I try to make a test, and find it will always return an ANSI string, and ignore the MAPI_UNICODDE flag at all.

    Is this a bug of the function?

    • Edited by tempc Friday, December 27, 2019 3:49 AM
    Friday, December 27, 2019 3:47 AM

All replies

  • If you explicitly specify the property type, that will be the property type you get. MAPI_UNICODE will only apply if you do not specify the property type (it is 0x0000).

    It is better to always specify the property type explicitly.

    Dmitry Streblechenko (MVP)
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Friday, December 27, 2019 3:49 AM
  • Hi, Dmitry,

    Thank you.

    Now with SetProps, I see document at , which said "


    Either the MAPI_UNICODE flag was set and the implementation does not support Unicode, or MAPI_UNICODE was not set and the implementation supports only Unicode.


    But there are no way to pass the MAPI_UNICODE flag at all!
    • Edited by tempc Friday, December 27, 2019 6:15 AM
    Friday, December 27, 2019 6:15 AM