CComFakeCriticalSection Class

 

For the latest documentation on Visual Studio 2017, see Visual Studio 2017 Documentation.

This class provides the same methods as CComCriticalSection but does not provide a critical section.

class CComFakeCriticalSection

Public Methods

NameDescription
CComFakeCriticalSection::InitDoes nothing since there is no critical section.
CComFakeCriticalSection::LockDoes nothing since there is no critical section.
CComFakeCriticalSection::TermDoes nothing since there is no critical section.
CComFakeCriticalSection::UnlockDoes nothing since there is no critical section.

CComFakeCriticalSection mirrors the methods found in CComCriticalSection. However, CComFakeCriticalSection does not provide a critical section; therefore, its methods do nothing.

Typically, you use CComFakeCriticalSection through a typedef name, either AutoCriticalSection or CriticalSection. When using CComSingleThreadModel or CComMultiThreadModelNoCS, both of these typedef names reference CComFakeCriticalSection. When using CComMultiThreadModel, they reference CComAutoCriticalSection and CComCriticalSection, respectively.

Header: atlcore.h

Does nothing since there is no critical section.

HRESULT Init() throw();

Return Value

Returns S_OK.

Does nothing since there is no critical section.

HRESULT Lock() throw();

Return Value

Returns S_OK.

Does nothing since there is no critical section.

HRESULT Term() throw();

Return Value

Returns S_OK.

Does nothing since there is no critical section.

HRESULT Unlock() throw();

Return Value

Returns S_OK.

Class Overview

Show: