两个嵌套的 DLL

发布于 2024-09-08 12:17:02 字数 222 浏览 6 评论 0原文

我们有一个dll文件;假设是 X.DLL。

我们现在正在编写另一个 DLL,假设“A.DLL”使用 X.DLL 的一些(很少)函数。我们无法访问 X.DLL 的源代码。另外,我们不想向客户提供 X.DLL 和 A.DLL。

相反,我们希望将 X.DLL 封装在 A.DLL 中,这样分发 A.DLL 就足够了。

有可能吗?

感谢您的帮助。

新手编码员

We have a dll file; let's say X.DLL.

We are now writing another DLL, let's say "A.DLL" that uses some (very few) of the functions of X.DLL. We have no access to source code of X.DLL. Also, we don't want to give our clients X.DLL along with A.DLL.

Instead, we want to encapsulate X.DLL within A.DLL, so that distributing A.DLL will suffice.

Is it something possible?

Your help is appreciated.

Novice Coder

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

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

发布评论

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

评论(4

甜妞爱困 2024-09-15 12:17:02

ILMerge

ILMerge 是一个用于合并的实用程序
将多个 .NET 程序集合并为一个
.NET 程序集。它适用于可执行文件
和 DLL 类似,并带有几个
控制处理的选项
和输出的格式。请参阅
随附文档
详细信息。

ILMerge

ILMerge is a utility for merging
multiple .NET assemblies into a single
.NET assembly. It works on executables
and DLLs alike and comes with several
options for controlling the processing
and format of the output. See the
accompanying documentation for
details.

小耗子 2024-09-15 12:17:02

您用 c# 标记了您的问题。

如果这些是托管程序集 DLL(如果代码是 C#,则它们将是),那么您可以使用 ILMerge

You tagged your question with c#.

If these are managed assembly DLL's, which they will be if the code is c#, then you can do exactly what you want with ILMerge.

五里雾 2024-09-15 12:17:02

将源代码从 x.dll 复制到具有所需功能的 a.dll。
或者将 x.dll 拆分为两个 dll

copy source code from x.dll to a.dll with required functions.
or split x.dll to two dll's

千里故人稀 2024-09-15 12:17:02

将一个 dll 封装到另一个 dll 中是不可能的。
如果您可以从 X.DLL 供应商那里获取一个库,并使用您的代码静态链接到它,则可能是一种解决方法。
黑客可能会将 X.DLL 作为 dll 内的资源,然后在运行时解压并加载。

It is impossible to encapsulate one dll into another.
A way out may be if you can obtain a lib from the X.DLL vendors, and statically link to it with your code.
A hack out may be carrying the X.DLL as a resource inside you dll, then unpack and load in in the runtime.

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