Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dll search path

Status
Not open for further replies.

arn0ld

Programmer
Mar 7, 2003
187
US
I have a set of dll files and an exe in a directory (DirA). The directory is not under \windows or \windows\system.
I copy the exe to another directory (DirB).
I want to run the exe from DirB.

Is there a procedure(s) I can use, without copying the dlls, so that Win will look into DirA when searching for the dlls?

I tried putting DirA in PATH, but this did not work.
 
Try this:

Open "Command Prompt", go to the directory where you put the dlls. Register the dlls from that directory.

C:\DirA>regsvr32 mydll_1.dll
C:\DirA>regsvr32 mydll_2.dll
so on...

Hope it works

-- AirCon --
 
AirCon,
regsvr32 apparently requires a "hook"/entry-point in the dll for this to work. My dll's don't have this hook.

Don't understand why windoze lacks this mechanism - unix/linux has at least 2 mechanisms (symbolic links and path settings)


 
Ahh..I see. If your dll doesn't use hook then you can put it anywhere you want. It's just a matter of pathing from the calling program.

What if your exe and dll is in the same directory ? is it work ?

-- AirCon --
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top