如何将.NET托管DLL注入另一个.NET流程
好吧,我想做的就是将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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
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.
我认为您的意思是.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");