How to make a synchronization mutex with access by every process?
问题 I need to use a global mutex to synchronize access to a mutually shared file by several processes. I create the mutex as such: HANDLE hMutex = ::CreateMutex(NULL, FALSE, L"Global\\MySpecialName"); And then use it in: //Entering critical section VERIFY(::WaitForSingleObject(hMutex, INFINITE) == WAIT_OBJECT_0); and then: //Leave critical section VERIFY(::ReleaseMutex(hMutex)); The issue arises from the fact that the processes sharing this mutex are a local-system service and several user-mode