CComAutoCriticalSection

class CComAutoCriticalSection

CComAutoCriticalSection provides methods for obtaining and releasing ownership of a critical section object. CComAutoCriticalSection is similar to class CComCriticalSection, except CComAutoCriticalSection automatically initializes critical section objects in the constructor.

Typically, you use CComAutoCriticalSection through the typedef name AutoCriticalSection. This name references CComAutoCriticalSection when CComMultiThreadModel is being used.

You should not use CComAutoCriticalSection in global objects or static class members if you want to eliminate the CRT startup code. In this case, use CComCriticalSection.

#include <atlbase.h>

Class Members

See Also   CComFakeCriticalSection