English 中文(简体)
如果我把两项申请都装入同一个应用程序,我能否与另一个管理的申请互动?
原标题:Can I interact with another managed application if I load both applications into the same AppDomain?

I have coded an application which is meant to be an extension to an already existing program. However, said program doesn t allow any methods for loading extensions/plugins, or whatever you would call them. For this reason I ve been thinking over a couple of possibilities, among which are injecting a C++ DLL and going crazy with it, but I m more interested in doing the entire thing in managed C#.

目标方案和我自己的方案都在C#中写成,因此得到了管理。 现在,我知道,如果我在自己的项目中提到目标方案,我可以“获得”视觉演播室编辑的特性、领域等,但我根本无法从这些编辑那里获得“真实的”价值,因为我无法在阅读成员时掌握目标方案,这意味着我无法从中获取任何“真实的”数据。

我的想法是这样:如果我要创建发射器,将DLL(C++,但d是唯一的C++部分)注入设定上诉程序的目标过程,把接收程序放在这个上诉人手中,然后把我的方案投入到同一个进程和上诉人手中,我是否能够获得目标方案的“实时”价值?

我知道,这是一颗长枪,实际上,如果不是几个星期的编码,就需要几天时间。 因此,我在这里问了;也许这是一个太不舒服和太脱节的比喻,但我认为,这实际上有可能奏效。 理论上。

因此,简化了一条轨道:。 Inject DLL into Target process -> Creat AppDomain -> Placeshop process in AppDomain -> Load MyProgram.exe into Process and AppDomain -> Access Target process methods and nature

最佳回答

我不敢肯定我理解你真正想要做些什么,但如果你再做些什么是在申请之间交换数据,而另一个将在同一机器上运行,那么为什么不使用WCF的通信,使用IPC的约束力(Net NamedPipeBled)。 我认为,这比你所建议的解决办法更合理,更便于维持和测试。

问题回答

暂无回答




相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签