简体   繁体   English

C# - 如何获取互斥锁的所有者名称

[英]C# - how can I get owner's name for a Mutex

I have a shared mutex between 2 applications. 我在两个应用程序之间有一个共享的互斥锁。 I want to create an administration console that shows the current owner's name of the mutex. 我想创建一个管理控制台,显示当前所有者的互斥锁名称。

How can I get the application name that currently owns the Mutex? 如何获取当前拥有Mutex的应用程序名称?

I do not believe this is possible at the user mode level. 我不相信这在用户模式级别是可能的。 You will have to install a driver or kernel plugin in order to get this information. 您必须安装驱动程序或内核插件才能获取此信息。

It's almost the same question as asking "what process opened this file"? 这与询问“什么过程打开此文件”几乎是同一个问题?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM