cmutex

interacting with a CMutex without MFC

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. ...

Is boost shared_ptr<XX> thread-safe?

Is the following code thread safe when using boost shared_ptr. Thanks! class CResource { xxxxxx } class CResourceBase { CResourceBase() { m_pMutex = new CMutex; } ~CResourceBase() { ASSERT(m_pMutex != NULL); delete m_pMutex; m_pMutex = NULL; } private: CMutex *m_pMutex; public: void SetResource(shared_ptr<CResource> res) { CS...