View Full Version : Loading dll Failed

09-21-2016, 04:44 AM

By IS2016, When I tried to load the dll by using the UseDLL function, i am getting the return value as -1. So loading dll got failed.

Background of the dll.:

we have the LOGIN dll developed in C++. This dll dependencies are two (CIPHER and CRYPTdlls).

1. CIPHER dll is loaded first by using UseDLL.
2. when the LOGIN dll is loading. trying to find the dependency CRYPT dll. Could not find the CRYPT dll. So LOGIN dll loading got failed.

When finding the CRYPT dll, first searching from SystemWOW64. After that, searching dll is not occurred.

In IS2012, while searching the CRYPT dll, first search in SystemWOW64, then windows, after that search from the TEMP folder.

So there is no issue in IS2012. But in IS2016, subsequent search is not occurred.

Environment: Same problem occurred in WINDOWS7 64bit, WINDOWS10 64bit.

Please help me to resolve this.


09-21-2016, 10:28 AM
We have implemented tighter DLL loading restrictions during installations, so the new behavior does not surprise me. For this particular case you can probably work around it most easily by explicitly loading the dependencies in a preceding call to UseDLL. For example: (tweak the order as necessary)
UseDLL(SUPPORTDIR ^ "LOGIN.DLL");You will probably then also want to call UnUseDLL for each of those DLLs where you currently only have it for LOGIN.DLL.

09-21-2016, 08:25 PM
So Whenever before loading the main dll, dependency dlls must be loaded by using UseDLL. Is it correct?

In IS2012, if we load the main dll, automatically dependency dlls will be searched and loaded.

Please confirm the behaviour in IS2016.