避开第三方循环dll依赖项? [英] Get around 3rd party cyclic dll dependencies?

查看:101
本文介绍了避开第三方循环dll依赖项?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试访问第三方应用程序中的TE Edit(来自ter32.dll)中的文本。 (有关此此处的第一篇文章),我在<一个href = http://www.subsystems.com/tewf_api.htm rel = nofollow noreferrer> API ,并尝试动态加载该dll以访问功能。不幸的是,ter32.dll的此(售后返修)具有大量的依赖关系。我尝试根据需要动态加载每个必需的dll,但是遇到了循环依赖性。 ter32.dll需要x。 x需要y。 y不会加载,因为它需要x。我是否需要延迟静态加载这些内容?我肯定希望不要,因为我不想在应用程序中产生开销/膨胀/依赖关系。

I am attempting to access text in a TE Edit (from ter32.dll) in a 3rd party application. (first post on this here) I looked through the API and tried to dynamically load the dll in order to access a function. Unfortunately, this (aftermarket rework) of ter32.dll has a load of dependencies. I tried dynamically loading each required dll as needed but ran into a cyclic dependency. ter32.dll requires x. x requires y. y won't load because it requires x. Would I have to statically load these with a delay? I sure hope not as I don't want the overhead/bloat/dependency in my application.

1)我缺少了什么?

2 )可以解决这个问题吗?

3)有人可以通过TE Edit对ter32.dll进行访问吗?

1) what am I missing?
2) is there some way around this?
3) does anybody have any other way of accessing the text in a TE Edit of ter32.dll?

推荐答案

在加载DLL时,加载程序将为您加载所有依赖项。这些依赖关系列在每个DLL的导入表中,并且加载程序会解析它们。您不需要做任何事情。

When you load a DLL the loader will load all the dependencies for you. These dependencies are listed in the import tables of each DLL and the loader resolves them. You don't need to do anything.

因此,我不明白您是如何得出自己需要处理DLL依赖项的结论的。您是否以非标准方式加载此DLL?是否需要清单文件来显示WinSxS依赖项,即是否需要MS C运行时?还有什么我们需要知道的吗?

Therefore I can't understand how you came to the conclusion that you yourself needed to process DLL dependencies. Are you loading this DLL in a non-standard way? Do you need a manifest for WinSxS dependencies, i.e. if the MS C runtime is needed? Is there something else we need to know?

所有这些,在我看来,将此DLL加载到您的进程中不太可能对从中提取文本有很大帮助。具有自己独立的虚拟内存的不同进程。换句话说,我非常有信心您当前提取文本的尝试将失败。解决虚拟内存障碍的方法是使用钩子在其他进程中运行代码。

All that said, having this DLL loaded into your process is not likely, in my view, to help much in extracting text from a different process which has its own separate virtual memory. In other words, I am quite confident that your current attempt to extract the text will fail. The way to get around the virtual memory barrier is to run your code in the other process using a hook.

这篇关于避开第三方循环dll依赖项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆