Changing the way Delphi application searches system DLLs

0

If any dummy system DLL is placed in my application folder my application loads the dummy DLL and causes an error.

For example: create version.dll in application folder and run the application will display this error:

Testscapi: TESTSCAPI.exe - Bad Image


D:\TESTApplications\TestSCAPI\VERSION.dll is either not designed to run on Windows or it contains an error. Try installing the program again using the original installation media or contact your system administrator or the software vendor for support. Error status 0xc0000020.


OK

Actually version.dll is a system DLL that is overridden by the dummy DLL placed in the application folder.

How to avoid the Delphi application from using the dummy DLL in the application path? Mentioned version.dll is for example, it could be any system DLL...

Thanks in advance.

windows
delphi
operating-system
system32
dll-search-path
asked on Stack Overflow Nov 19, 2019 by Anto Raja Prakash • edited Nov 20, 2019 by Anto Raja Prakash

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0