1 year ago

#378453

test-img

Roland Smith

When do unmanaged DLLs get unloaded when used by C# web pages?

Our web application is written in C# ASP.Net on Windows IIS. We needed to interface with a third party unmanaged DLL that can only be used from C++. I created a C++ DLL wrapper and C# wrapper around that. It works pretty well but every few days the application pool needs to be restarted. I'm wondering if there is a way to guarantee my DLL and the third party DLL get unloaded from memory once the C# web page is done with it. I know that Windows loads one copy of a DLL per process and multiple threads share it until the last thread using it frees it. I'm just a beginner at C# so I have no idea how it handles unmanaged DLL loadlibrary/freelibary.

c#

c++

asp.net

unmanaged

0 Answers

Your Answer

Accepted video resources