Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

CCritSec class

The CCritSec class provides a thread lock.

This class is a thin wrapper for a Windows CRITICAL_SECTION object. You can lock and unlock the thread by calling the CCritSec::Lock and CCritSec::Unlock methods. However, it is safer to use this class in conjunction with the CAutoLock class. When the CAutoLock class goes out of scope, it automatically unlocks the CCritSec object. Moreover, it compiles to efficient inline code.

Public Member Variables Description
m_currentOwner Thread identifier of the owning thread.
m_lockCount Number of outstanding locks on this object.
m_fTrace Boolean value that specifies whether to trace this lock.
Public MethodsDescription
CCritSec Constructor method.
~CCritSec Destructor method.
Lock Locks the critical section object.
Unlock Unlocks the critical section object.

 

Requirements

Header

Wxutil.h (include Streams.h)

Library

Strmbase.lib (retail builds);
Strmbasd.lib (debug builds)

See also

Critical Section Objects
DirectShow Base Class Reference

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.