Click here to Skip to main content
15,906,329 members
Home / Discussions / COM
   

COM

 
GeneralRe: Accessing a file's properties from a VC++ application Pin
algol14-Oct-03 21:59
algol14-Oct-03 21:59 
GeneralCOM Dialog box Pin
Anthony98873-Oct-03 8:48
Anthony98873-Oct-03 8:48 
GeneralRe: COM Dialog box Pin
Abhishek Srivastava19-Oct-03 21:01
Abhishek Srivastava19-Oct-03 21:01 
GeneralUse of CommandButton Active X Pin
Jo Fredrickson2-Oct-03 20:37
Jo Fredrickson2-Oct-03 20:37 
GeneralRe: Use of CommandButton Active X Pin
Amit Dey8-Oct-03 10:41
Amit Dey8-Oct-03 10:41 
GeneralIApplication woes Pin
AndyP12-Oct-03 0:36
AndyP12-Oct-03 0:36 
GeneralRe: IApplication woes Pin
AndyP12-Oct-03 5:16
AndyP12-Oct-03 5:16 
GeneralAn Outlook plug-in issue Pin
dorutzu1-Oct-03 8:04
dorutzu1-Oct-03 8:04 
Hi,

I'm witting an Outlook plugin in VC++, using ATL.
When a button in outlook is pressed, my plug-in will create a new mail, or reply to the selected one, or forward it. Now, the problem is that after generating this new window(for new mail, reply or fwd), when I close Outlook, another instance of Outlook remains somewhere running (I see it in Task Manager, and I have to close it form there). Any ideea what do wrong? Here is part of my code from the reply command:

for(int i=1; i<=lItemCount; i++)
{
CComPtr<idispatch> spDisp;
CComVariant vt(i); //get selected item number i
hr = spSelection->Item(vt, &spDisp);
if(FAILED(hr))
return;
CComQIPtr< Outlook::_MailItem > spMailItem(spDisp);
CComPtr<outlook::_mailitem> spMailItem2;
if(FAILED(hr))
return;
if(spMailItem!=NULL)
{
spMailItem->Reply(&spMailItem2);
BSTR subj;
spMailItem->get_Subject(&subj);
CString str = "Re:";
str += W2T(subj);
spMailItem2->put_Subject(T2W(str));
BSTR htmlBody;
spMailItem->get_HTMLBody(&htmlBody);
str = ReadHTMLIntoString((CString)W2T(bstrMSname)); //insert the Reply .html
str += "


Original text:

"; //something between our text and the original text
str += W2T(htmlBody);
htmlBody = T2W(str);
spMailItem2->put_HTMLBody(htmlBody);
spMailItem2->Display();
}
spMailItem2.Detach();
spMailItem.Detach();
spDisp.Detach();
}

I think something should be done with spMailItem2, but I just don't know what.

I would really appreciate any help.

Thanks,
Doru K
GeneralRe: An Outlook plug-in issue Pin
Mike Dimmick1-Oct-03 12:36
Mike Dimmick1-Oct-03 12:36 
GeneralRe: An Outlook plug-in issue Pin
dorutzu9-Oct-03 14:09
dorutzu9-Oct-03 14:09 
GeneralThread Pin
Anthony98871-Oct-03 3:55
Anthony98871-Oct-03 3:55 
GeneralRe: Thread Pin
billdwilson31-Oct-03 9:44
billdwilson31-Oct-03 9:44 
GeneralCOM-Marshaling-IUnknown as method param Pin
ceno1-Oct-03 3:29
ceno1-Oct-03 3:29 
GeneralAcrobat Distiller OLE/COM Automation Pin
HooK.NET1-Oct-03 1:49
HooK.NET1-Oct-03 1:49 
GeneralRe: Acrobat Distiller OLE/COM Automation Pin
Steve S1-Oct-03 3:12
Steve S1-Oct-03 3:12 
GeneralRe: Acrobat Distiller OLE/COM Automation Pin
HooK.NET1-Oct-03 3:29
HooK.NET1-Oct-03 3:29 
Generaltyplib marshalling or custom marshalling Pin
umarcool29-Sep-03 4:29
umarcool29-Sep-03 4:29 
QuestionHow to add a new protocol for Internet explorer? Pin
Robert Mao28-Sep-03 5:17
Robert Mao28-Sep-03 5:17 
AnswerRe: How to add a new protocol for Internet explorer? Pin
Tomas Petricek28-Sep-03 10:51
Tomas Petricek28-Sep-03 10:51 
GeneralQuestion about Com Process Pin
FeedFood27-Sep-03 0:01
sussFeedFood27-Sep-03 0:01 
GeneralRe: Question about Com Process Pin
umarcool29-Sep-03 19:14
umarcool29-Sep-03 19:14 
Generalunhandle exception using CreateDispatch Pin
danielferre26-Sep-03 2:04
danielferre26-Sep-03 2:04 
GeneralRe: unhandle exception using CreateDispatch Pin
Steve S26-Sep-03 4:34
Steve S26-Sep-03 4:34 
GeneralRe: unhandle exception using CreateDispatch Pin
danielferre26-Sep-03 6:12
danielferre26-Sep-03 6:12 
GeneralRe: unhandle exception using CreateDispatch Pin
jmkhael1-Oct-03 5:17
jmkhael1-Oct-03 5:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.