Solved

Accessing DLLs in multiple directories

Posted on 2004-10-06
4
168 Views
Last Modified: 2010-04-16
Hi, am writing a program using PVCS and PVCS tracker DLLS to attempt to coordinate tracker associated files with their status in PVCS.  the program needs to load the TRKTooln.dll for tracker, and vmwfdk.dll for pvcs.  These DLLs are in their respective program directories, and call other libraries.

I would like to have my program call these DLLS, and have the DLLS be able to call their respective libraries, even though they are in different directories.  Ideally, I would be able to specify the path each DLL is to search as program options, so that the thing could continue to work ,regardless of network drive mapping.

So, how can I tell me program where to go to call these DLLS, and then tell the DLLs where to search to call the libraries that they need?

If it helps, I can call the tracker DLLs first, save information, close my links to tracker, and then call PVCS.

Thanks!
0
Comment
Question by:mitcht
  • 3
4 Comments
 
LVL 6

Expert Comment

by:vadim_ti
ID: 12241319
hi,
you simple have to add path to your dlls to path environment variable
0
 
LVL 6

Expert Comment

by:vadim_ti
ID: 12241431
if you use LoadLibrary function you can save path to your DLL in ini file or registry and retrieve it
before calling LoadLibrary
0
 

Author Comment

by:mitcht
ID: 12242705
OK, I must be really vapor locked, how do I (temporarily) alter the search path?
0
 
LVL 6

Accepted Solution

by:
vadim_ti earned 125 total points
ID: 12242890
if you do not use  dinamic linking (LoadLibrary / FreeLibrary) you cannot change path from your code
you will get exception before you can do anything.
so you will need to change path with windows tools, before execution of your application
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now