Search code examples
outlookmapioutlook-redemption

Remove Store Method issue


When we remove store for PST using Redemption DLL, how we ensure about deletion of temp file?

That means, in our recent case we found we have call Remove Store method it executed successfully but some how temp file not deleted successfully.

So How we decide, if Remove store successfully deleted temp file or not?

Test Case: I have question for similar issue, let's consider i have 15 PST files to process, i running loop for those 15 files to logon and Remove store.

I can understand, for the last file it can be having reference till exe not closed but are we not able to delete 14 files for which process completed successfully ?

Based on some test case, this temp files are deleted some time and some time it not deleting there is no specific behavior of this.

Is there any method or property using which we can identify if resource is really in use for particular PST file ?

Note: we are processing PST file in individual machine with standalone application..

Thanks


Solution

  • Are you removing a PST store? Keep in mind that MSPST provider will keep the PST fiel (and the temp file) open for another 30 minutes (or until your app terminates) for the performance reasons.

    If you want the PST file closed and dereferenced immediately, you can move the PST processing code into an auxiliary exe, launch it from your main app, wait for that process to terminate. At that point the PST and all the temp files will be closed.