关于.NET Process AppDomain NativeDll的问题!

FiLng 2003-07-22 04:18:22
If an assembly is used by multiple domains in a process, the assembly's code (but not its data) can be shared by all domains referencing the assembly. This reduces the amount of memory used at run time. This method of sharing an assembly's code is similar to the way in which the Microsoft Win32 API LoadLibrary shares code pages among processes that reference the same DLL. An assembly is said to be domain-neutral when its code can be shared by all domains in the process. The runtime host decides whether to load assemblies as domain-neutral when it loads the runtime into a process.

我的问题是:
如果我的.NET Process有两个AppDomain,其中一个AppDomain里的对象使用P/Invoke调用一个Native Dll里的函数,那这个Native Dll被加载到哪里?
调用者所在的AppDomain?
两个AppDomain之外与clr在同一unmanged区域?
...全文
29 6 打赏 收藏 举报
写回复
6 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
qqchen79 2003-07-24
  • 打赏
  • 举报
回复
Native dlls have absolutely no idea about AppDomain. They are only loaded in processes. So any AppDomains in the same process will share the code of that native dll. And if there is any static data in the native dll, those data are also shared accross AppDomains.
FiLng 2003-07-24
  • 打赏
  • 举报
回复
thanks
saucer 2003-07-24
  • 打赏
  • 举报
回复
see the discussion in this post which might help you:

http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=YcMaBCeSCHA.3072%40cpmsftngxa10
FiLng 2003-07-23
  • 打赏
  • 举报
回复
怎么没人理?
FiLng 2003-07-23
  • 打赏
  • 举报
回复
up
FiLng 2003-07-22
  • 打赏
  • 举报
回复
up!
相关推荐
发帖
C#

10.8w+

社区成员

.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
帖子事件
创建了帖子
2003-07-22 04:18
社区公告

让您成为最强悍的C#开发者