description | title | ms.date | f1_keywords | helpviewer_keywords | ms.assetid | ||||
---|---|---|---|---|---|---|---|---|---|
Learn more about: CComAutoCriticalSection Class |
CComAutoCriticalSection Class |
11/04/2016 |
|
|
491a9d90-3398-4f90-88f5-fd2172a46b30 |
CComAutoCriticalSection
provides methods for obtaining and releasing ownership of a critical section object.
class CComAutoCriticalSection : public CComCriticalSection
Name | Description |
---|---|
CComAutoCriticalSection::CComAutoCriticalSection | The constructor. |
CComAutoCriticalSection::~CComAutoCriticalSection | The destructor. |
CComAutoCriticalSection
is similar to class CComCriticalSection, except CComAutoCriticalSection
automatically initializes the critical section object in the constructor.
Typically, you use CComAutoCriticalSection
through the typedef
name AutoCriticalSection. This name references CComAutoCriticalSection
when CComMultiThreadModel is being used.
The Init
and Term
methods from CComCriticalSection are not available when using this class.
CComAutoCriticalSection
Header: atlcore.h
The constructor.
CComAutoCriticalSection();
Calls the Win32 function InitializeCriticalSection, which initializes the critical section object.
The destructor.
~CComAutoCriticalSection() throw();
The destructor calls DeleteCriticalSection, which releases all system resources used by the critical section object.
CComFakeCriticalSection Class
Class Overview
CComCriticalSection Class