Bagikan melalui


CComCritSecLock Class

This class provides methods for locking and unlocking a critical section object.

template< 
   class TLock 
> class CComCritSecLock

Parameters

  • TLock
    The object to be locked and unlocked.

Members

Public Constructors

Name

Description

CComCritSecLock::CComCritSecLock

The constructor.

CComCritSecLock::~CComCritSecLock

The destructor.

Public Methods

Name

Description

CComCritSecLock::Lock

Call this method to lock the critical section object.

CComCritSecLock::Unlock

Call this method to unlock the critical section object.

Remarks

Use this class to lock and unlock objects in a safer way than with the CComCriticalSection Class or CComAutoCriticalSection Class.

Requirements

Header: atlbase.h

See Also

Reference

CComCriticalSection Class

CComAutoCriticalSection Class