Mattias,
This is Kris again. Your code properly registers/unregisters DLLs. However
if later I try to remove any of the DLLs that were unregistered, still from
withing the same program (or to remove a directory where they reside ) I get
an exception: Exception deleting directory: Access to the path "XXX.dll" is
denied. If the program is still running and I try to remove any of the DLLs
manually from Windows Explorer I get a message box: Cannot delete: Access is
denied. The source file may be in use. Every DLL that was unregistered is
still in use! Apparently the DllRegServer class is still holding a reference
to every DLL file that was unregistered. I tried several things I could think
of, even calling Garbage Collector explicitly but the problem persists until
I exit the program. I wonder if you have any thougths on that? Regards,
Kris.
"Mattias Sjögren" wrote:
Thanks for any ideas.
Here's one solution:
http://www.msjogren.net/dotnet/eng/s...dynpinvoke.asp
Mattias
--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.