为什么我的exe在本地寻找version.dll?

问题描述 投票:0回答:1

我在 Lazarus 中生成的可执行文件有问题(我对 Lazarus 安装文件夹中的示例文件夹中的任何项目也有同样的问题)和 Windows dll version.dll。我知道 Windows 有一个顺序 https://learn.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-search-order 操作系统在其中搜索库,

我尝试使用选项 LOAD_WITH_ALTERED_SEARCH_PATH 但我担心我必须静态链接库而不是动态链接。如何让我的exe只在windows系统目录下查找version.dll库?

In the process monitor app i can see that first the dll is searched locally and then on Windows system

windows dll exe pascal lazarus
1个回答
0
投票

不确定是否可以在 Lazarus 中定义自定义清单,但对于 Delphi,可以在此处找到解决方案:

如何避免使用 WinApi.Windows 的 Delphi 应用程序中的 dll 劫持

Ps:创建玛尼

© www.soinside.com 2019 - 2024. All rights reserved.