com - Problem in releasing memory from an Outlook pst file -


I am working on a winning app which accesses Outlook personal folders. Internally, it mounts the personal folder on the Outlook instance and executes the mail and then unmount the pst. After unmounting PST, I delete that file.

The problem now is that even after increasing PST and releasing memory, when I try to remove PST, I get some exceptions that some process is using this file, so delete it Can not go and this process is the approach I'm using the following code in the mount and release memory:

  _application.Session.RemoveStore (_personalFolder); While (system.timetime.interposervices.martial.release com object (_personal fold)> = 0); _personalFolder = Faucet;  

I checked it several times and it seems like it takes some time to release the memory and there is no definite time for it. Can anyone help me remove the file?

This is about Outlook 97, but I think it still works.

I think this will not help you because there is no "exclusive lock release" event.

So maybe you can create a worker thread, which is continuously all. Pst files are queued so that your app UI can be minimally uninterrupted.

The ability to view file handles of applications such as the appliance may be that you are capable of making an API call that allows you to do this for the owl process (this is another such question I think this is good content). This way you do not have to choose the file system, and when the lock is over you can work faster.

If you dare, you can immediately stop the handle of the file in question, completely eliminate the need for choice / wait.


Comments