如何将.NET托管DLL注入另一个.NET流程

发布于 2025-02-04 07:05:00 字数 105 浏览 2 评论 0原文

好吧,我想做的就是将c#dll注入另一个c#过程中, 然后从外部(我们称其为“喷油器”)调用DLL的方法,所有这些都来自C#。

是否可以?

怎么做?

谢谢

Well, what i want to do is Injecting a C# DLL into another C# process,
then from outside (lets call it "the injector") call a method of that dll, all of this from c#.

Is it possible?

How to do it?

Thanks

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

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

发布评论

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

评论(2

阳光的暖冬 2025-02-11 07:05:00

easyhook 是您的朋友。

您可以使用它提供的远程挂钩功能将托管DLL加载到目标过程中,并使用.NET远程调用方法。

EasyHook is your friend.

You can use the remote hooking functionality it provides to load a managed dll into target process, and invoke methods with .NET remoting.

不甘平庸 2025-02-11 07:05:00

我认为您的意思是.NET库的DLL。因为C#是编程语言而不是一个过程。在.NET项目中,DLL来自.NET运行时库。为了在运行时加载DLL,您可以使用:
assembly.loadfrom(“ example.dll”);

I think that you mean .net libraries' dlls. Because c# is programming language not a process. In .net projects, dll's comes from .net runtime libraries. In order to load dll's in runtime you can use:
Assembly.LoadFrom("example.dll");

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