Reputation: 27
I am currently working on a plugin dll für a 3rd party app. This plugin dll is written in C#. The plugin dll uses c++ dll and imports its functions via DllImport.
Every time I recompile the c++ dll while the 3rd party app is running, the compiler mentions: LINK : fatal error LNK1104: cannot open file 'cpp.dll'
Then I have to close the 3rd party app. Unloading the plugin dll seems to be not enough. When the 3rd party app is closed I can recompile cpp.dll
Question: What do I have to do in my C# code, so that the cpp.dll is unloaded every time the plugin.dll is unloaded and so that I dont not have to close the 3rd party app ?
I tried to find solutions to unload cpp.dll but was not successful or the suggested solution do not seem to be reliable.
Upvotes: 0
Views: 119