?
Solved

Accessing DLLs in multiple directories

Posted on 2004-10-06
4
Medium Priority
?
188 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 375 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Integration Management Part 2
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Suggested Courses

755 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