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 ...

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Can U pl explain more?
Please explain what you are trying to do.
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.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Build an EXE that exports some functions . If you want the file to be loaded in its own address space , just run it .
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.