Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

(C#) DllImport and dll loading question

Avatar of MikeDotNet555
MikeDotNet555 asked on
.NET ProgrammingC#
6 Comments1 Solution960 ViewsLast Modified:
1. If I load 2 instance of my program wich use the same dll (using [DllImport]) wich was written in delphi,  will a different instance be loaded for each different app or will the dll be loaded once and answer the calls from both instances of my app?

2. If the answer to question 1 is that it use the same dll instance, would copying the folder and running each instance of the program from different folders have different results?

3. Is there an alternative to load dll's explicitly instead of calling dllImport? For example, would something like the code snippet below be possible?
var myDll = LoadDll("MyLib.dll");
myDll.DoSomething();
ASKER CERTIFIED SOLUTION
Avatar of williamcampbell
williamcampbellFlag of United States of America image

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Commented:
This problem has been solved!
Unlock 1 Answer and 6 Comments.
See Answers