开发者

How can I "unload" a dll?

开发者 https://www.devze.com 2023-04-05 06:15 出处:网络
In VB I use the following to load a DLL into memory, and then I call functions in that DLL when I need to:

In VB I use the following to load a DLL into memory, and then I call functions in that DLL when I need to:

oDLL = [Assembly].Load(b)

Where 'b' is a byte array that con开发者_StackOverflowtains the DLL. There are times when the loaded DLL will be updated and I need to send the new one to a customer. As it stands they have to restart the software that loads the DLL. I would rather the software be able to unload the loaded DLL and then load the new one. Anyone know of a way to do this?


It is rather nontrivial task. Short version: you can't unload assemblies in .net. Long version: you can unload app domain with all assemblies, so that you will have manage several app domains in your application.

0

精彩评论

暂无评论...
验证码 换一张
取 消