Error In CreateInstace of Outlook 2000 in WindowsXP

J

jignesh2680

Dear Expert ,

I am developing an outlook Automation application in VC 6.0 .
My Application works fine in all windows 2000 Family both in Admin user
and local user .

Operating System Used : WindowsXP professional
Outlook : 2000

But the Application fails to create instance of outlook when i run my
appliction in local user
of WindowsXP . But the same application works fine in ADMIN user .

For Further Reference my code is :

[FAILS IN LOCAL USER ]

_ApplicationPtr pOutlook = NULL;

hRes = pOutlook.CreateInstance("Outlook.Application"); // Fails With
Error : -2147221005


Method 2 :

CLSID clsid;
IUnknown* punk;
HRESULT hRetVal = CLSIDFromProgID(OLESTR("Outlook.Application"),
&clsid);
hRetVal = CoCreateInstance(clsid, NULL, CLSCTX_LOCAL_SERVER,
IID_IUnknown, (LPVOID *) &punk);

But this aslo fails with NO clsid ....

Can anybody Please Tell me where i am going wrong....

Thanks in Advance

Regards ,

Jignesh
 

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