在C#中更改流程的名称?流程、名称

2023-09-03 16:58:43 作者:几两放荡

是否有可能改变当前执行的进程名在C#(或.NET一般的)?我认为这是不可能的,但我的同事正在试图解决的假设,它是根据一个问题。

Is it possible to change the name of a currently executing process in C# (or .NET in general)? I believe it isn't possible, but my co-worker is trying to solve a problem under the assumption that it is.

推荐答案

没有也不可能改变当前正在执行的进程的名称。过程名称由将其加载到操作系统来执行的时候执行开始的名称的文件中定义。在以后你不能改变这一点。这是真正的C#,托管和本机code。

No it is not possible to change the name of the currently executing process. Process names are defined by the name file which was loaded into the operating system for execution at the time execution began. You cannot change this at a later point. This is true for C#, managed and native code.

 
精彩推荐
图片推荐