Link to home
Start Free TrialLog in
Avatar of mitcht
mitchtFlag for United States of America

asked on

Accessing DLLs in multiple directories

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!
Avatar of vadim_ti
vadim_ti

hi,
you simple have to add path to your dlls to path environment variable
if you use LoadLibrary function you can save path to your DLL in ini file or registry and retrieve it
before calling LoadLibrary
Avatar of mitcht

ASKER

OK, I must be really vapor locked, how do I (temporarily) alter the search path?
ASKER CERTIFIED SOLUTION
Avatar of vadim_ti
vadim_ti

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial