Problem Opening Email when using InvokeHelper in C++

Discussion in 'MFC' started by andynewtoC++, May 6, 2011.

  1. andynewtoC++

    andynewtoC++ New Member

    Joined:
    May 6, 2011
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hi

    I have an MFC Project, and what this project does is to allow a user to Open an in a number of different way, either a new email message, a new email message using a template or open an existing email message. The MFC is part of a much larger application and some of the data for selecting the correct email templates and opening an existing email comes from a web service.

    My MFC Project works to a certain, I can get Outlook, I can get my Web Service with my email template, but when I reach the point of Open the Email either a new one, open or otherwise it fails. Here is my code snippet:

    CString emailPath;
    LPDISPATCH mailItem;
    static BYTE params [] = VIS_BSTR VTS_VARIANT ;

    m_outlook->(0x10a, DISPATCH_METHOD, VT_DISPATCH, (void*)&mailItem, params, emailPath, NULL) //falls over here!

    outlookMailItem = new COleDispatchDriver(mailItem);

    What I have done wrong?

    Thanks
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice