We're using a c++ native dll in a C# .NET application. The native dll logs the DllMain DLL_PROCESS_ATTACH and DLL_PROCESS_DETACH call into a file. During some time the .NET application runns, we find a lot if DLL_PROCESS_DETACH and DLL_PROCESS_ATTACH
log entries with a time gap between 3s and 30s.
What happens here?
In my opinion, if a dll is once loaded into .NET domain, it cannot be unloaded!