CComGlobalsThreadModel

#if defined( _ATL_SINGLE_THREADED )
typedef CComSingleThreadModel CComGlobalsThreadModel;

#elif defined (_ATL_APARTMENT_THREADED)
typedef CComSingleThreadModel CComGlobalsThreadModel
#else
typedef CComMultiThreadModel CComGlobalsThreadModel;

#endif

Depending on the threading model used by your application, the typedef name CComGlobalsThreadModel references either CCComSingleThreadModel or CCComMultThreadModel. These classes provide additional typedef names to reference a critical section class.

Using CComGlobalsThreadModel frees you from specifying a particular threading model class. Regardless of the threading model being used, the appropriate methods will be called.

At a Glance

Header file: Atlbase.h
Platforms:
Versions: Version 2.0 and later
Complete documentation: Visual C++ documentation

Remarks

Windows CE only supports the single threading and free threading models. It doesn't support the apartment threading model.

See Also

CComObjectRootEx