Problem in Security Outlook manager in VC++,ATL addin

Add-in Express™ Support Service
That's what is more important than anything else

Problem in Security Outlook manager in VC++,ATL addin
 
Jay Chadderwala


Guest


Respected Sir,


We have purchesed your Outlook Security Manager ActiveX Edition today. Username is Deep Joshi.

We have developed outlook addin in Visual C++ 6.0 and ATL. Basic funtionality of our addin is to send email using both Outlook Object Modal and CDO,after some processing of original email. Outlook addin does this by calling MFC Extension DLL for sending email.

Now after getting your activex edition of Outlook Security Manager, We have inserted activex control in helper dll via Projects -> Add to project -> Components and controls from VC6 IDE menu.It has added class of your dll. Then we have following code placed in our helper dll ( which responsible for sending emails ) but security warning dialogs are still coming. Can u explain Why? Are we doing wrong?


::CoInitialize(NULL);

_ApplicationPtr pOutlook("Outlook.Application");

COutlookSecurityManager SecMan;


_MailItemPtr pMailItem = NULL;

bstr_t bstrPath(strPath);

pMailItem = pOutlook->CreateItemFromTemplate(bstrPath);

SecMan.ConnectTo((_variant_t)pOutlook);

SecMan.SetDisableOOMWarnings(TRUE);

CString strTo = jay.chadderwala@emsure.com;

bstr_t bstrTo(strTo);
pMailItem->put_To(bstrTo);


pMailItem->raw_Send();

pOutlook = NULL;
pMailItem = NULL;

::CoUninitialize();


above code compiles successfully and sends mail also but showing security dialogs.



It would be great if u can support us by supplying appropriate VC6 sample code.


Regards
Jay
Emsure PLC
Posted 20 May, 2005 06:23:58 Top
Dmitry Kostochko


Add-in Express team


Posts: 2741
Joined: 2004-04-05
Hi Jay,

I think you don't need to call the ConnectTo method. Calling this method is necessary only in a standalone application, not in an Outlook COM add-in.

Posted 20 May, 2005 07:35:22 Top