具有多个Exes的Windows应用程序 [英] Windows Application with Multiple Exes

查看:64
本文介绍了具有多个Exes的Windows应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨朋友们,



我正在做一个处理主应用程序中许多线程的项目。 (通过电话打电话,接听电话等等。)

现在,我打算为数字和剪贴板号搜索添加屏幕截图并调用它们......而且,我认为它会更重主应用程序。

我可以将它作为一个不同的Windows应用程序,并使用命令行参数(单实例)传达主应用程序吗?

它是否会有任何性能影响... ???

解决方案

嗯,是的......



使用命令行参数只有在你第一次启动应用程序时才有可能 - 因此每次使用它时都需要启动一个新实例 - 这意味着在定位exe,加载它,为它准备一个新的内存空间时会增加系统开销,以及等等,在它开始执行你的代码之前,发现它应该是单个实例并找到一种方法将参数传递给已经运行的版本。



如果你想要使用多应用程序appr因为必须建立并严格控制通信,所以总会有额外的开销 - 这可能比现有应用程序保持内部全部的影响大 - 界面内容很简单,因为它只包含类实例创建和/或方法调用。



如果使用单独的DLL将应用程序拆分为多个项目,这可能是最好的方法 - 这样,如果你需要让其中一个成为独立的EXE,它至少更简单!


您是否考虑过使用插件? [ ^ ]



使用WCF的插件? [ ^

Hi friends,

I am doing a project that handles many threads in its main application. (Calling through phones, picking up calls etc..)
Now, I am planning to add screen capture for numbers and clipboard number search and calling them... and, I think it would be heavier for the main application.
Can I make it as a different windows application and communicate the main application using command line parameters (Single instance) ??
Does it will have any performance impacts... ???

解决方案

Well, yes...

Using command line params is only possible when you first start the application - so each time you use it you will need to start a new instance - which means there is an added system overhead in locating the exe, loading it, prepping a new memory space for it, and so on before it starts to execute you code, discovers it should be single instance and finds a way to pass the parameters to the already running version.

If you want to use a multi-application approach, there will always be an extra overhead involved since the communications have to be established and tightly controlled - and that may be larger than the impact on your existing app of keeping it all internal - where the interface stuff is trivial since it consists solely of class instance create and / or method calls.

Possibly the best way if to split your app into multiple projects using separate DLLs instead - that way, if you do need to make one of them a stand-alone EXE later, it's at least simpler to do!


Have you considered using Plug-Ins ? [^]

Plug-Ins using WCF ? [^]


这篇关于具有多个Exes的Windows应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆