检测系统中正在播放哪个玩家 [英] detect which player is playing in the system

查看:54
本文介绍了检测系统中正在播放哪个玩家的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

R/S
我想问一下如何检查系统中正在播放哪个玩家?
实际上,我必须创建一个应用程序,该应用程序应该检测系统上正在播放哪个播放器.

在此先感谢

您能否给我一些展示如何使用Process.GetProcessbyName的网络链接.在c#.net application

R/S
I want to ask how can I check which player is playing in my system?
actually I have to create an application which should detect which player is playing on the system.

thanks in advance

Can you please give me some weblink demonstrating how to use Process.GetProcessbyName. in c# .net application

推荐答案

中,类System.Diagnostics.Process.GetProcessByName不会给您任何东西.首先,无论谁在玩,它都将是相同的进程名称.其次,这是不可靠的:两个完全不同且不相关的进程可能会意外获得相同的名称.请参阅 http://msdn.microsoft.com/en-us/library/system.diagnostics .process.aspx [ ^ ].这是您真正需要的唯一Web链接. :-)

我建议您在应用程序内部简单地引入播放器身份验证.这是通常的做法.

—SA
The class System.Diagnostics.Process.GetProcessByName won''t give you anything. First, it will be the same process name no matter who is playing. Secondly, this is unreliable: two completely different and unrelated processes can accidentally get the same name. See http://msdn.microsoft.com/en-us/library/system.diagnostics.process.aspx[^]. This is the only Web link you really need. :-)

I would suggest you simply introduce player authentication inside your application. This is a usual practice.

—SA


查看此
Check out this link[^]. It will lead you to other useful links.


您无法真正有效地做到这一点.那里有数十名球员.检测哪个正在运行的唯一方法是知道要支持的每个播放器的文件名,然后检查Process.GetProcessbyName返回的进程列表.
You can''t really do that effectively. There''s dozens of players out there. The only way to detect which is running in to know the filename of every player you want to support, then check the list of process'' returned by Process.GetProcessbyName.


这篇关于检测系统中正在播放哪个玩家的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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