I am working on a win application that accesses Outlook personal folders. Internally, it mounts the personal folder in the Outlook instance and processes the mail, and then disables pst. After unmounting pst, I delete this file.
Now the problem is that even after un-installing pst and freeing up memory, when I try to remove pst, I get an exception that some process uses this file, so it cannot be deleted. And this process is a perspective. I use the following code to install and free memory:
_application.Session.RemoveStore(_personalFolder); while (System.Runtime.InteropServices.Marshal.ReleaseComObject(_personalFolder) >= 0) ; _personalFolder = null;
I checked it many times, and it seems that it takes some time to free memory, and there is no specific time for this. Can someone help me delete the file?
object outlook com
Kapil Jan 28 '09 at 8:29 2009-01-28 08:29
source share