Redemption with Outlook2000 problem

  • Thread starter Thread starter dorutzu
  • Start date Start date
D

dorutzu

Hi,

Could someone tell me why this initialization of a SafeMailItem
(Visual C++) does not work in Outlook 2000, but it does very well in
Outlook XP and 2003:

CLSID clsid;
ISafeMailItemPtr pSafeMail = NULL;

if ((hr = ::CLSIDFromProgID(L"Redemption.SafeMailItem", &clsid)) !=
NOERROR)
return;

if ((hr = ::CoCreateInstance(clsid, NULL, CLSCTX_INPROC_SERVER,
__uuidof(ISafeMailItem), (void**)&pSafeMail)) != S_OK)
return; //here is the problem -> hr = -2147221008

....and of course, help me get on the right track :-)

Thanks a lot,
Doru
 
Did you register the dll using regsvr32.exe? Can you use VB Script to call
CreateObject("Redemption.SafeMailItem") on the same machine?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
Hi,

I found the problem...I forgot to use CoInitialize(). It seemns like
Outlook2000 is more delicate on this subject then XP and 2003.
Thanks anyway,
Doru
 
Back
Top