DLL 的导出量怎么可能为零?

发布于 2024-08-20 00:53:59 字数 138 浏览 4 评论 0原文

我最近遇到了一个安装在我的系统上的 DLL,Dependancy Walker(以及我尝试过的所有其他实用程序)说它的名称或序号导出为零,但该文件的大小约为 4mb。我认为 DLL 的唯一目的是导出函数以供其他代码使用,那么没有可见导出的 DLL 的目的是什么?

I recently ran across a DLL installed on my system that Dependancy Walker (and every other utility I tried) says has zero exports by name or ordinal, yet the file is approximately 4mb in size. I thought the sole purpose of a DLL was to export functions for use by other code so what would be the purpose of a dll with no visible exports?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

将 DLL 视为函数的容器的一种方式。从 DLL 导出函数使这些函数对 DLL 外部的调用者可见。虽然从 DLL 导出函数可能是提供对它们的访问的最常见方法,但许多平台提供了其他方法来访问尚未导出的函数,例如 .NET Framework 和 Java 中的反射以及(我认为)LoadLibtary / GetProcAddress Win32

这样做的原因多种多样,通常是因为在库中拥有函数对开发人员有利,但从外部应用程序调用这些函数是不受欢迎的

One way to think of a DLL is as a container for functions. Exporting a function from a DLL makes those functions visible to callers outside of the DLL. While exporting functions from a DLL is perhaps the most common way to provide access to them, many platforms provide other ways to access functions which have not been exported such as reflection in the .NET Framework and Java and (I think) LoadLibtary / GetProcAddress in Win32

Reasons for doing this are varied, often it is because it is beneficial to the developer to have functions in a library but undesirable for those functions to be called from external applications

够钟 2024-08-27 00:53:59

也许是纯资源 DLL?例如,它们经常用于本地化目的。

编辑:也可以有一个 DLL,其代码在 DllMain() 中执行某些操作,以某种方式使其功能可用。例如,DLL 可以向某些全局调度程序注册自身,或者创建命名内核对象......

Resource-only DLL, maybe? Those are used quite often for localization purposes, for example.

EDIT: it's also possible to have a DLL with code that does something in DllMain() to somehow make its functionality available. The DLL can register itself with some global dispatcher, for example, or create named kernel objects...

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文