cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
schwindi
Level 3

UseDll failes in maintenance mode

Hi,

with the script setup I install a dll and their necessary vc++ runtime dlls. After moving the dll to the target directory and after installing the vc++ runtime dlls, I load my dll with UseDll() and call some functions within and unload the dll afterwards with UnUseDll(). Everything works fine.

When starting the setup a second time in maintenance mode, I directly try to load the dll with UseDll() but this function call fails (Err.LastDllError = 126). I checked the existence of the dll file and also checked if it is unlocked before calling UseDll(). Both checks are okay. Nevertheless i cannot load the dll.

The strange thing is, when debugging the setup (in maintenance mode) within InstallShield everything works fine again and the dll can be loaded.

Can anybody help me with this problem?
Labels (1)
0 Kudos
(2) Replies
DLee65
Level 13

Could you have some type of dependency issue going on for the DLL in maintenance mode?

You say you check to see if the file exists, and then to see if it is unlocked. What directory is the file in during a first install compared to the maintenance mode? Can you determine that when you debug?
0 Kudos
schwindi
Level 3

The dll exists in the SUPPORTDIR for the first and for the maintenance install. It depence on some VC++ Runtime components (which I added to the setup as merge modules) and from another dll which also exists in the SUPPORTDIR. I try to load the dll within OnFirstUIAfter() and OnMaintUIAfter().
I also thought that it might be caused by some other dll dependencies but every thing works fine when when calling UseDll() within the first install and when debugging the maintenance install. So in these two cases it all seems that all necessary dependencies exist.
0 Kudos