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:
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?