如何让应用程序将多个进程堆叠到同一个应用程序域中?

发布于 2024-08-04 00:17:30 字数 251 浏览 3 评论 0原文

下面是我想要执行的操作的示例:

运行 test.exe,创建新的 Windows 进程,创建新的 CLR 应用程序域,创建新的 CLR 进程。 运行test.exe,创建新的Windows进程,意识到CLR应用程序域存在,重新启动第一个CLR应用程序域中的CLR进程并关闭Windows进程。 运行另外 20 个 test.exe 实例,它们都存在于同一个 Windows 进程和同一个 CLR 应用程序域中。

至少,这是这个想法。

建议?

So here's an example of what I'm wanting to do:

Run test.exe, new Windows process is created, new CLR Application Domain is created, new CLR process is created.
Run test.exe, new Windows process is created, realizes CLR Application Domain exists, restarts CLR process in the first CLR Application Domain and closes with Windows process.
20 more instances of test.exe are run and they all exist in the same windows process and the same CLR Application Domain.

This is, at least, the idea.

Suggestions?

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

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

发布评论

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

评论(1

迷路的信 2024-08-11 00:17:30

CLR 应用程序域永远不能包含多个 Windows 进程,反之亦然。我不认为“CLR 进程”是一个定义明确的术语,但我认为您可以通过创建 “单实例”应用程序

A CLR appdomain can never contain multiple Windows processes, it's always the other way around. I don't think a "CLR process" is a well defined term, but I think you can accomplish what you want by creating a "single instance" application.

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