Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I don't think there is a trivial way to resolve the actual owner of a Mutex, but the process that owns it can create other secondary items whose lifetimes are tied to it. There are plenty of mechanisms that are suitable for calling back across-process without having a main window.</p> <ol> <li>Register an object in the COM Running Object Table. Clients that are unable to take ownership of the Mutex can lookup the owner via the ROT and call back to the owner. A File Moniker should be suitable for registration here.</li> <li>Create a chunk of shared memory containing location details for the owner process. From there, write into the buffer the process handle and thread handle of a thread that can receive windows messages, and then use PostThreadMessage() to send a notification. Any other competing process may open the shared memory for read-only to determine where to send a windows message.</li> <li>Listen in the owner process on a Socket or Named Pipe. Probably overkill and not a good match for your needs.</li> <li>Use a shared file with locking. I'm not fond of this because the owner will need to poll, and it won't gracefully handle N potential other processes that could be trying to contact the owner at the same time.</li> </ol> <p>Here are reference links for the first two options.</p> <ol> <li><a href="http://msdn.microsoft.com/en-us/library/ms695276%28VS.85%29.aspx" rel="nofollow noreferrer">IRunningObjectTable @ MSDN</a> , <a href="http://msdn.microsoft.com/en-us/library/ms688670%28VS.85%29.aspx" rel="nofollow noreferrer">File Monikers @ MSDN</a></li> <li><a href="http://msdn.microsoft.com/en-us/library/aa366551(v=VS.85).aspx" rel="nofollow noreferrer">Creating Named Shared Memory @ MSDN</a> </li> </ol>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload