Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
CComCriticalSection Class
Collapse the table of content
Expand the table of content

CComCriticalSection Class

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

class CComCriticalSection

Name

Description

CComCriticalSection::Init

Creates and initializes a critical section object.

CComCriticalSection::Lock

Obtains ownership of the critical section object.

CComCriticalSection::Term

Releases system resources used by the critical section object.

CComCriticalSection::Unlock

Releases ownership of the critical section object.

Name

Description

CComCriticalSection::m_sec

A CRITICAL_SECTION object.

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.

Header: atlcore.h

Show:
© 2015 Microsoft