Original Post
hi, I have following problem: Example Class A defined as: class ClassA { private: CRITICAL_SECTION m_mutex; int var; public: ClassA() { InitializeCriticalSection(&m_mutex); var = 0; } ~ClassA() { DeleteCriticalSection(&m_mutex); } int GetVar() { EnterCriticalSection(&m_mutex); return var; LeaveCriticalSection(&m_mutex); } void SetVar(int v) { EnterCriticalSection(&m_mutex); var = v; LeaveCriticalSection(&m_mutex); } }; Methods GetVar and SetVar are being called from different threads, of cource. Problem is that my program hangs up when those methods are being called. So what I need is "class member level" synchronization. Any hints?