给MAF插件,它作为单独的进程自定义名称运行 [英] Give MAF plugin which run as separate process a custom name

查看:206
本文介绍了给MAF插件,它作为单独的进程自定义名称运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我激活使用MAF我的插件 - 在一个单独的进程[托管加载在框架。

I activate my plugin using MAF[Managed Add - In Framework] in a separate process.

的问题是,它给默认名称AddInProcess32到每个   插件,它作为一个单独的进程中运行。

The problem is that it gives default name "AddInProcess32" to the each plugin which run as a separate process.

我可以给一个自定义的名称,其中MAF创造的过程?如果是的话怎么样?

PS:为什么我想给自定义名称?因为我不希望用户误杀掉进程... 我想给的过程,表明它是我的应用程序的一部分,显然是一个名字。

PS: Why i want to give custom name? Because i do not want user to kill process by mistake... I want to give process a name which shows it is part of my app clearly.

推荐答案

虽然可取的确,这是不幸的是不可能的,因为正确地Dos095,拉斯已经在他的回答同一个问题的How指定的AddIn程序的名字?(+1那边)。

While desirable indeed, this is unfortunately not possible, as analyzed correctly by Dos095-russ already in his answer to the identical question How to specify AddIn process names? (+1 over there).

为了使赏金值得你有点起码,我会添加一些情况下,虽然:

To make the bounty worth your while a bit at least, I'll add some context though:

名对于该过程中的的.hosting.addinprocess.aspx相对=nofollow> AddInProcess类截止到非常宗旨类已被设计为,即的提供[S]外部进程运行插件输出的过程从主机应用程序的。具体机制感动在说明的部分:

The Filename for that process is hardcoded in the constructor of the AddInProcess Class due to the very purpose the class has been designed for, namely to Provide[s] an external process for running add-ins out-of-process from the host application. The specific mechanics are touched in the Remarks section:

在运行加载项的可执行文件的两个文件之一获得   在Windows目录下的.NET框架安装。通过   缺省情况下,相匹配的主机的位每字可执行   应用程序被使用。如果主机是一个64位的过程中,AddInProcess.exe   是运行;否则,AddInProcess32.exe运行。要指定方式   可执行文件被选中,使用AddInProcess(平台)构造函数   创建AddInProcess对象。

The executable that runs the add-in is obtained from one of two files installed with the .NET Framework under the Windows directory. By default, the executable that matches the bits-per-word of the host application is used. If the host is a 64-bit process, AddInProcess.exe is run; otherwise, AddInProcess32.exe is run. To specify the way the executable is selected, use the AddInProcess(Platform) constructor to create the AddInProcess object.

可能需要针对为何出的进程加载项的主要原因的一些的应用程序是正确总结在Danielg的回答的 MEF和MAF(System.AddIn)之间进行选择。如果这些都其实并不适用于你的使用情况,您可以游览提供的解答和链接是MEF替代System.Addin <? /一>,以便判断,托管扩展框架(MEF)是否可能实际上是一个更好的解决方案 - 这是非常好的东西它做顺便说一句,很容易与编程,并广泛使用的相应

The main reasons for why out-of-process add-ins might be needed by some applications are properly summarized in Danielg's answer to Choosing between MEF and MAF (System.AddIn). If those do actually not apply to your use case, you could explore the answers and links provided for Is MEF a replacement for System.Addin? in order to judge, whether the Managed Extensibility Framework (MEF) might be a better solution in fact - it's excellent for what it does btw., very easy to program with and widely used accordingly.

这篇关于给MAF插件,它作为单独的进程自定义名称运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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