getting the DLLs in the application's home directory to be called upon instead of the registered DLLs

Viewed 95

Yes, I know vb6 ancient and all that. It's still an interesting question. and the issue might not even be with vb6....

Background: We have a server running a vb6 application for our users who access this via Citrix. This installed application accesses its DLLs (also written in vb6) from a "shared folders" location.

What I want to do is have the previous version of this same app on the same server, accessing it's own set of (previous versions) DLLs. I am half way successful. the renamed app in another directory runs. But it crashes immediately upon using any feature that draws from the DLL's code.

Apparently the registered DLLs of the current version are being called upon. I dont want that. I want the DLLs found in the same directory as the renamed older app to be called upon.

Can that happen in a windows server? is this an installer's settings issue? Have you ever had this situation before? were you successful?

thanks in advance. Harry

Post Script: The bosses decided that experimenting with the DLLs and system settings was a waste of my time and not worth the risk. So they're throwing money at it and another server will come online for the sole reason of providing the previous version to the citrix users who want it. Thank you to all of you who pitched in with great tips and leads to other posts. (yeah I'm sort of disappointed too. Kind of wanted to know what the solution was to this.....)

1 Answers

The OS should be looking for the dll’s in the following places and order

  1. The directories listed in the App Path registry key (HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionApp Paths) if any
  2. The directory where the executable module for the current process is located
  3. The current directory
  4. The Windows system directory
  5. The Windows directory
  6. The directories listed in the PATH environment variable

Given that you are using a shared folder for your dll’s, I would suppose that the app is setting the current directory to your shared folder OR is using the PATH environmental variable to specify where to look. I don’t think it is using the app path registry key path because that is version specific and you said you are using a different version.

I would suggest your try setting the path via HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionApp Paths

Related