Redemption with Outlook2000 problem

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
 
D

Dmitry Streblechenko \(MVP\)

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
 
D

dorutzu

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top