• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 259
  • Last Modified:

How to load the same DLL in different memory spaces

Is it possible to load the same DLL in their own memory space ?
if so, how ...

Regards
marss
0
marss
Asked:
marss
1 Solution
 
inprasCommented:
Can U pl explain more?
Regards
0
 
SampsonCCommented:
Please explain what you are trying to do.
0
 
arikkaCommented:
No. All application's code, data,resources and dynamic memory resides within an application's process. It is not possible for an application to address data or code residing outside of its own process. Because of that , when DLL is loaded it must somehow reside in the process of application loaded it; if more than one application loads the same DLL it must resides in each application's process. So, to satisfy requirenmnet - to be reentrant (accessible from more than one thread at time) and have only ony copy of the DLL physically loaded into memory WIN32 uses mapping. Through memory mapping WIN32 is able to load the DLL once into the application that loads it. Notice that the DLL is physically loaded into the global heap once, yet several applications share the code and resources of the DLL.
0
 
WxWCommented:
Build an EXE that exports some functions . If you want the file to be loaded in its own address space , just run it .
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now