locked
How to get text message from SMS inbox when it is in conversation mode? RRS feed

  • Question

  • It's a context menu application. Menu context is "Inbox", and class is "List_View". I want to get text message of current selected item. The code works for all email items and SMS messages in "single mode", not in "threaded (conversation) mode". But it can't get text message when it's in "threaded (conversation)" mode.

    OpenEntry() returns "Invalid EntryID":

      // pSession is a pointer to IMAPISession interface.
    HRESULT hr = pSession->OpenEntry(cbMessageID, (ENTRYID*)messageID, NULL, 0, NULL, (LPUNKNOWN *)&pMapiMessage); if (hr == MAPI_E_INVALID_ENTRYID) { TRACE(L"MAPI system says that messageID is an invalid entry id"); }
    But cbMessageID looks good, and messageID looks good. Both of them are from the site object which is passed in by "SetSite(IUnknown* pSite)". These code follows the well known sample application MedicalHistory and InboxMenuExtensibiliy.

    I guess, the EntryID of the current selected SMS isn't an ID for message, rather the ID for conversation which is a bunch of messages. But I can't found documents support my idea, and no documents demostrate how to get messages from a conversation.

    Can anyone help me?
    Thanks in advance!

    Xueqing
    Wednesday, May 6, 2009 11:18 AM