Archive: Call dll from the execution directory at runtime


Call dll from the execution directory at runtime
Here is what I need to do:

I have my .exe setup in a folder and I want to add a .dll file in the same folder.
This dll file is called from the setup script, but can be changed without any setup compilation.

I tried to open this file like that from the script:

File /nonfatal /oname=$PLUGINSDIR\test.DLL "$EXEDIR\file.dll"

then later :
System::Call '$PLUGINSDIR\test::func()'

But the script is not able to find the dll file at runtime, even if it is in the right folder...
Any idea on how to do that ?


"File" command is used to ADD files into the setup.exe during compilation and EXTRACT them during installation. So what did you expect?
If you don't want some files to be included into setup.exe, use CopyFiles.
And in your case, you don't even really need to copy that dll to $PLUGINSDIR.


Is it possible then to call this dll without any previous copy off the file ?
Just like this ?

System::Call '$EXEDIR\test::func()'

It seems not to work and I have the same problem doing:

CopyFiles "$EXEDIR\test.DLL" $TEMP
System::Call '$TEMP\test::func()'


System::Call "$EXEDIR\file.dll::func()"
or
CallInstDLL "$EXEDIR\file.dll" func


I try to use:
System::Call "$EXEDIR\file.dll::func()"

but I have a Windows Popup of Program error...
By the way, I try to build my setup as not compressed but the result is still a unique .exe file.
Is it possible to have all the files non compressed as the result of a build ?
Thx a lot !