This documentation is archived and is not being maintained.

CComCriticalSection Class

This class provides methods for obtaining and releasing ownership of a critical section object.

class CComCriticalSection

Remarks

CComCriticalSection is similar to class CComAutoCriticalSection, except that you must explicitly initialize and release the critical section.

Typically, you use CComCriticalSection through the typedef name CriticalSection. This name references CComCriticalSection when CComMultiThreadModel is being used.

See CComCritSecLock Class for a safer way to use this class than calling Lock and Unlock directly.

Requirements

Header: atlcore.h

Example

See the PooledAsync Sample.

See Also

PooledAsync Sample

Class Members | CComFakeCriticalSection | ATL Class Overview | CComCritSecLock

Show: