Export (0) Print
Expand All
ATL
Expand Minimize

CAtlAutoThreadModule Class

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

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.

NoteNote

This class replaces the obsolete CComAutoThreadModule class.

Header: atlbase.h

Community Additions

ADD
Show:
© 2014 Microsoft