CAtlAutoThreadModule Class

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at CAtlAutoThreadModule Class.

This class implements a thread-pooled, apartment-model COM server.

System_CAPS_ICON_important.jpg Important

This class and its members cannot be used in applications that execute in the Windows Runtime.

class CAtlAutoThreadModule : public CAtlAutoThreadModuleT<CAtlAutoThreadModule>

CAtlAutoThreadModule derives from CAtlAutoThreadModuleT and implements a thread-pooled, apartment-model COM server. CAtlAutoThreadModule uses CComApartment to manage an apartment for each thread in the module.

You must use the DECLARE_CLASSFACTORY_AUTO_THREAD macro in your object's class definition to specify CComClassFactoryAutoThread as the class factory. You should then add a single instance of a class derived from CAtlAutoThreadModuleT such as CAtlAutoThreadModule. For example:

CAtlAutoThreadModule _AtlAutoModule; // name is immaterial.

System_CAPS_ICON_note.jpg Note

This class replaces the obsolete CComAutoThreadModule class.

IAtlAutoThreadModule

CAtlAutoThreadModuleT

CAtlAutoThreadModule

Header: atlbase.h

CAtlAutoThreadModuleT Class
IAtlAutoThreadModule Class
Class Overview
Module Classes

Show: