Failed to connect to PST file using MAPI
I am writing program for fetching data from Exchange sever and PST files.
Program faces following four scenarios for connections
1. Repeatedly connect to exchange server
2. Repeatedly connect to PST file
3. First connect to exchange server and then to PST file
4. First connect to PST file and then to Exchange server.
However, third scenario is not working (i.e. After connecting to exchange
sever, I am not able to connect to PST file). In this scenario, Code to
connect to PST file, fails in IMsgServiceAdmin::ConfigureMsgService with
MAPI_E_NO_ACCESS error. Error message displayed is as follows
"The file E:\Outlook.pst has changed since you last run Microsoft Office
Outlook. The change will take effect next time you start Outlook"
Please Note:
For each connection, separate temporary MAPI profile and MAPI session is
created.
After each connection termination, all varibles are released, profile is
deleted, IMAPISession::Logoff and MAPIUninitialize is called.
Can anyone help me out why this error comes?
Any help on this will be greatly appreciated,
Thanks,
Rohit
url:http://www.ureader.com/gp/1651-1.aspx
date: Fri, 14 Mar 2008 13:52:02 +0800
author: Rohit Gattani