What's the lifetime of an unmanaged DLL once it's been pInovked from managed code?

自闭症网瘾萝莉.ら 提交于 2019-12-24 06:21:59

问题


For example if you have a simple managed console app and a simple unmanaged C++ DLL. You pInvoke into a function in the C++ DLL, does the DLL stay loaded in the unmanaged process until said process comes down? Or does the DLL get unloaded at the completion of every pInvoke call?


回答1:


It stays in memory unless you explicity tell it to unload.



来源:https://stackoverflow.com/questions/3920261/whats-the-lifetime-of-an-unmanaged-dll-once-its-been-pinovked-from-managed-cod

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!