locked
how to differentiate between normal message and multimedia messages when we get the detail of message with the help of MAPI RRS feed

  • Question

  • Hello all,

    I have implemented code to reterive the informations of message stored in Inbox with the help of Messaging API's (MAPI).
    It is working fine and I can get the information like Sender Name, subject and delivery time. However if the Inbox contain any multimedia messages in it, the application crashes for

    hr = pTbl->QueryRows (1, 0, &pRowSet);


    ASSERT (pRowSet->aRow[0].cValues == spta.cValues);
    SPropValue *pval = pRowSet->aRow[0].lpProps;
    ASSERT (pval[1].ulPropTag == PR_SUBJECT);


    ASSERT (pRowSet->aRow[0].cValues == spta.cValues);
    SPropValue *pval = pRowSet->aRow[0].lpProps;

    ASSERT (pval[1].ulPropTag == PR_SUBJECT);

    ASSERT (pval[1].ulPropTag == PR_SUBJECT);


    LPCTSTR pszSubject = pval[1].Value.lpszW;
    _tcslen(pszSubject);  //crash

    if I check for the value of pszSunject it contains some junk value in it of large size.

    I was looking for some property on the basic of which I can differntiate a message as normal or multimedia message but couldnt find anything relevent.

    Kindly suggest me how to overcome this problem.

    Thanks & regards,

    Priya

    Thursday, January 14, 2010 10:45 AM

Answers

  • Try with PR_MESSAGE_CLASS. An SMS will have "IPM.SMSText", an MMS (depending on implementation) will have something different (I have almost always seen "IPM.MMS").

    HTH,

    GG

    • Marked as answer by warrentang Wednesday, January 20, 2010 9:27 AM
    Monday, January 18, 2010 3:50 PM

All replies

  • Hi Priya,

    Microsoft does not provide API for MMS. I think you'd better contact the manufacturer and see what they have to offer. You can find many discussions about this kind of question if you search for "MMS" in the smart device forms, such as this one:
    http://social.msdn.microsoft.com/Forums/en-US/windowsmobiledev/thread/18fc3b38-8829-4d19-88cc-0c874a73258e 

    Regards,
    Chunsheng Tang
    Please mark the post that helps you, and unmark that does not. This benefits our community.
    Monday, January 18, 2010 9:11 AM
  • Try with PR_MESSAGE_CLASS. An SMS will have "IPM.SMSText", an MMS (depending on implementation) will have something different (I have almost always seen "IPM.MMS").

    HTH,

    GG

    • Marked as answer by warrentang Wednesday, January 20, 2010 9:27 AM
    Monday, January 18, 2010 3:50 PM
  • Thank you for the information.
    I will try the same.
    Tuesday, February 2, 2010 1:36 PM