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

2019-01-27 22:32发布

问题:

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?

回答1:

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"?