如何卸载托管C ++ dll? [英] how to unload managed c++ dll?

查看:120
本文介绍了如何卸载托管C ++ dll?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

A.dll是本机c ++ dll,B.dll是托管c ++ dll。 A.dll依赖于B.dll,因此在加载A.dll时,会自动加载B.dll,但是在卸载A.dll之后,仍会加载B.dll。只有A.dll依赖于B.dll,为什么无法卸载B.dll?如何卸载托管C ++ dll?我正在使用vs2010。

A.dll is a native c++ dll, B.dll is a managed c++ dll. A.dll depends on B.dll, so when load A.dll, B.dll is loaded automatically, but after A.dll is unloaded, B.dll is still loaded. Only A.dll depends on B.dll, why B.dll can't be unloaded? How to unload the managed c++ dll? I'm using vs2010.

谢谢

推荐答案

您无法卸载由CLR加载后的托管程序集。唯一的方法是杀死AppDomain。

You cannot unload a managed assembly once it is loaded by the CLR. The only way is to kill the AppDomain.

这篇关于如何卸载托管C ++ dll?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆