Force Unload DLL
I wonder if someone can help me. I have an application that loads a dll. This dll that is loaded calls and loads other dll's as it sees fit based on the filetype my apllication is dealing with. One of these DLL's 'PDFFILT.dll' (Adobe PDF IFilter dll) is not unloading itself after it has been used and is causing my appilcation to throw up an error when exiting.
'The instruction at "0x0a5a609c" referenced memory at "0x00000014". The memory could not be "read".'
All the functionality of the aplication works fine, it is only when closing my application that I receive this error.
Does anybody know how I can unload this dll during my application exit routine?
I have searched and come across "Freelibrary()" but canot seem to get it to work.
Any help anybody can offer is much appreciated.
Assemblies cannot be unloaded. The only way to unload an assembly is to unload the AppDomain that loaded it, which means that you'd have to load the assembly in a separate AppDomain in the first place. I have no idea about the details as I've never had to do it. If I wanted to know, I'd search the web.