We have multiple MFC apps, which use CMutex( false, ‘blah’ ), where ‘blah’ allows the mutex to work across process boundaries.
One of these apps was re-written without MFC (using Qt instead). How can I simulate the CMutex using Win32 calls? (Qt’s QMutex is not inter-process.) I prefer not to modify the MFC apps.
For inter-process mutexes you want these calls:
These are the underlying Win32 API calls that CMutex is a wrapper around.
For in-process only mutexes you can also use these calls, which are faster: