www.pudn.com > myFilter.rar > myNetSenderFilter.h
class CCritSec {
// make copy constructor and assignment operator inaccessible
CCritSec(const CCritSec &refCritSec);
CCritSec &operator=(const CCritSec &refCritSec);
CRITICAL_SECTION m_CritSec;
#ifdef DEBUG
public:
DWORD m_currentOwner;
DWORD m_lockCount;
BOOL m_fTrace; // Trace this one
public:
CCritSec();
~CCritSec();
void Lock();
void Unlock();
#else
public:
CCritSec() {
InitializeCriticalSection(&m_CritSec);
};
~CCritSec() {
DeleteCriticalSection(&m_CritSec);
};
void Lock() {
EnterCriticalSection(&m_CritSec);
};
void Unlock() {
LeaveCriticalSection(&m_CritSec);
};
#endif
};