in reply to List Mutexes on Win32

Is it possible to list all Mutexes currently open?

Do you mean

All three are possible, but doing so requires the use of some fairly complex and obscure 'debugging' APIs. From memory, it also means using some officially 'undocumented' APIs--though my memory could be wrong on that.

It's also the case that, other than for the purposes of debugging, it is usually not necessary to generate a list of existing Mutexes, so if you were to describe why you want to do this, there may be a simpler way of achieving your goal.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."

Replies are listed 'Best First'.
Re^2: List Mutexes on Win32
by slloyd (Hermit) on Feb 05, 2007 at 22:15 UTC
    It just occured to me that a DOS application that allowed me to view mutexes and semaphores might be a quicker way to debug than using Process Explorer from sysinternals. I believe they use an undocumented API called HandleEx.

    -------------------------------
    Need a good Perl friendly Host Provider?
    http://www.dreamhost.com

      Hmm. The other tool around that can do this is SysInternals HandleEx. This apparently requires a custom (and non-open source) device driver to achieve it.

      I'm positive I saw some sample code showing how to do this whilst searching for something else a coupe of years ago, but I cannot find it now.


      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.