如何在两个进程之间的共享内存中加载一个DLL? [英] How to load a dll in a shared memory between two process?
本文介绍了如何在两个进程之间的共享内存中加载一个DLL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
考虑需要加载某些DLL的两个进程。如果他们都加载这些DLL,他们会占用大量内存。如何在其中一个进程中加载这些DLL,并且能够在另一个进程中使用它们?这两个DLL可以在两个进程之间的共享内存中加载吗?
consider two processes that need to load some DLLs. If both of them load these DLL's they take a lot of memory. How can I load these DLL's in just one of the processes and be able to use them in another process too? Can these DLL's load in a shared memory between two process?
推荐答案
嗯... AFAIK,代码只加载一次,这正是dll背后的想法。
如果你想在它们之间共享数据,请看看:
http://msdn.microsoft.com/en-us/library/windows/desktop/aa366551%28v = vs.85%29.aspx [ ^ ]
Hmmm... AFAIK, the code is only loaded once, that is precisely the idea behind a dll.
If you want to share data between them, have a look at:
http://msdn.microsoft.com/en-us/library/windows/desktop/aa366551%28v=vs.85%29.aspx[^]
这篇关于如何在两个进程之间的共享内存中加载一个DLL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文