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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Order which program searches for DLL

Status
Not open for further replies.

mathprof

Programmer
Nov 8, 2000
37
US
When a program is installed on a server and called from a workstation, in which order does it search directories for required DLLs?

If an outdated DLL is in the system directory at a workstation will it interfere if the correct DLL is on the server?

Prof Weissman

 
If I understand your question correctly, I believe it looks in the current working directory (CWD) first. It if finds the DLL there it will load it. If not I think it goes to the ($WinSysPath - typically C:\Windows\System on 95/98 or C:\WINNT\System32 for NT). If it finds it there it will load it. If it doesn't find it either place then you usually get an error message saying that it can't load the dll.

If you needed to have an older version of the DLL, then you should place it in the same directory as the application.

The System/System32 directory on the server will not be searched if the application is being launched from a remote workstation. The local system directory is the one that will be searched. However, if the DLL is in the application directory on the server and the program is launched from the remote machine, the dll from the server will be used... UNLESS, the DLL is a self registering DLL, then the application will go to the Registry to determine where the DLL is to load.

Clear as mud now right? Sorry if this sounds confusing, but let me say I'm PRETTY sure this is the order that the dll's are searched for. If I'm wrong, someone please correct me. Snaggs
tribesaddict@swbell.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top