getting E_NOINTERFACE trying to create outlook.application in vc++ (2005) on xp

J

jay.oleary

Hello:

I'm getting E_NOINTERFACE when I try to create an outlook.application
object in vc++ (2005) on xp running outlook 2003.


HRESULT hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);

CLSID clsidOutlook;
CLSIDFromProgID(L"Outlook.Application", &clsidOutlook);


CComPtr<IDispatch> OutlookPtr;
hr = CoCreateInstance(clsidOutlook, NULL, CLSCTX_LOCAL_SERVER,
IID_IDispatch,(void **)&OutlookPtr);


hr is always E_NOINTERFACE...
 
J

jay.oleary

hmmmm....looks like a security/outlook2003 issue. The above works on
my home machine the only difference being outlook 2000.

Still, there must be a way to get around it...I'm trying to do
something similiar to google desktop's "view in outlook" by launching
outlook with a specific email.

Is there another way to do this without using COM?
 
D

Dmitry Streblechenko

Can you create a vbs file that calls CreateObject("Outlook.Application")? Do
you have any AV products (McAffee, Norton, etc) installed?

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

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