Skip to content

Latest commit

 

History

History
74 lines (47 loc) · 2.55 KB

ccomautocriticalsection-class.md

File metadata and controls

74 lines (47 loc) · 2.55 KB
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: CComAutoCriticalSection Class
CComAutoCriticalSection Class
11/04/2016
CComAutoCriticalSection
ATLCORE/ATL::CComAutoCriticalSection
ATLCORE/ATL::CComAutoCriticalSection::CComAutoCriticalSection
CComAutoCriticalSection class
491a9d90-3398-4f90-88f5-fd2172a46b30

CComAutoCriticalSection Class

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

Syntax

class CComAutoCriticalSection : public CComCriticalSection

Members

Public Constructors

Name Description
CComAutoCriticalSection::CComAutoCriticalSection The constructor.
CComAutoCriticalSection::~CComAutoCriticalSection The destructor.

Remarks

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.

Inheritance Hierarchy

CComCriticalSection

CComAutoCriticalSection

Requirements

Header: atlcore.h

CComAutoCriticalSection::CComAutoCriticalSection

The constructor.

CComAutoCriticalSection();

Remarks

Calls the Win32 function InitializeCriticalSection, which initializes the critical section object.

CComAutoCriticalSection::~CComAutoCriticalSection

The destructor.

~CComAutoCriticalSection() throw();

Remarks

The destructor calls DeleteCriticalSection, which releases all system resources used by the critical section object.

See also

CComFakeCriticalSection Class
Class Overview
CComCriticalSection Class