ATL Typedefs

 

For the latest documentation on Visual Studio 2017, see Visual Studio 2017 Documentation.

For the latest documentation on Visual Studio 2017, see ATL Typedefs on docs.microsoft.com. The Active Template Library includes the following typedefs.

_ATL_BASE_MODULEDefined as a typedef based on _ATL_BASE_MODULE70.
_ATL_COM_MODULEDefined as a typedef based on _ATL_COM_MODULE70.
_ATL_MODULEDefined as a typedef based on _ATL_MODULE70.
_ATL_WIN_MODULEDefined as a typedef based on _ATL_WIN_MODULE70
ATL_URL_PORTThe type used by CUrl for specifying a port number.
CComDispatchDriverThis class manages COM interface pointers.
CComGlobalsThreadModelCalls the appropriate thread model methods, regardless of the threading model being used.
CComObjectThreadModelCalls the appropriate thread model methods, regardless of the threading model being used.
CContainedWindowThis class is a specialization of CContainedWindowT.
CPathA specialization of CPathT using CString.
CPathAA specialization of CPathT using CStringA.
CPathWA specialization of CPathT using CStringW.
CSimpleValArrayRepresents an array for storing simple types.
DefaultThreadTraitsThe default thread traits class.
LPCURLA pointer to a constant CUrl object.
LPURLA pointer to a CUrl object.

Defined as a typedef based on _ATL_BASE_MODULE70.

typedef ATL::_ATL_BASE_MODULE70 _ATL_BASE_MODULE;   

Remarks

Used in every ATL project. Based on _ATL_BASE_MODULE70.

Classes that are part of the ATL 7.0 Module Classes derive from the _ATL_BASE_MODULE structure. For more information on ATL Module Classes, refer to COM Modules Classes.

Defined as a typedef based on _ATL_COM_MODULE70.

typedef ATL::_ATL_COM_MODULE70 _ATL_COM_MODULE;   

Remarks

Used by ATL projects which use COM features. Based on _ATL_COM_MODULE70.

Defined as a typedef based on _ATL_MODULE70.

typedef ATL::_ATL_MODULE70 _ATL_MODULE;   

Remarks

Based on _ATL_MODULE70.

Defined as a typedef based on _ATL_WIN_MODULE70.

typedef ATL::_ATL_WIN_MODULE70 _ATL_WIN_MODULE; 
 

Remarks

Used by any ATL projects which use windowing features. Based on _ATL_WIN_MODULE70.

This class manages COM interface pointers.

typedef CComQIPtr<IDispatch, &__uuidof(IDispatch)> CComDispatchDriver;   

Calls the appropriate thread model methods, regardless of the threading model being used.

#if defined(_ATL_SINGLE_THREADED)  
typedef CComSingleThreadModel CComGlobalsThreadModel;  
#elif defined(_ATL_APARTMENT_THREADED)  
typedef CComMultiThreadModel CComGlobalsThreadModel;  
#elif defined(_ATL_FREE_THREADED)  
typedef CComMultiThreadModel CComGlobalsThreadModel;  
#else  
#pragma message ("No global threading model defined")  
#endif   

Remarks

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

System_CAPS_ICON_note.jpg Note

CComGlobalsThreadModel does not reference class CComMultiThreadModelNoCS.

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

In addition to CComGlobalsThreadModel, ATL provides the typedef name CComObjectThreadModel. The class referenced by each typedef depends on the threading model used, as shown in the following table:

typedefSingle threadingApartment threadingFree threading
CComObjectThreadModelSSM
CComGlobalsThreadModelSMM

S= CComSingleThreadModel; M= CComMultiThreadModel

Use CComObjectThreadModel within a single object class. Use CComGlobalsThreadModel in an object that is globally available to your program, or when you want to protect module resources across multiple threads.

Calls the appropriate thread model methods, regardless of the threading model being used.

#if defined(_ATL_SINGLE_THREADED)  
typedef CComSingleThreadModel CComObjectThreadModel;  
#elif defined(_ATL_APARTMENT_THREADED)  
typedef CComSingleThreadModel CComObjectThreadModel;  
#elif defined(_ATL_FREE_THREADED)  
typedef CComMultiThreadModel CComObjectThreadModel;  
#else  
#pragma message ("No global threading model defined")  
#endif   

Remarks

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

System_CAPS_ICON_note.jpg Note

CComObjectThreadModel does not reference class CComMultiThreadModelNoCS.

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

In addition to CComObjectThreadModel, ATL provides the typedef name CComGlobalsThreadModel. The class referenced by each typedef depends on the threading model used, as shown in the following table:

typedefSingle threadingApartment threadingFree threading
CComObjectThreadModelSSM
CComGlobalsThreadModelSMM

S= CComSingleThreadModel; M= CComMultiThreadModel

Use CComObjectThreadModel within a single object class. Use CComGlobalsThreadModel in an object that is either globally available to your program, or when you want to protect module resources across multiple threads.

This class is a specialization of CContainedWindowT.

typedef CContainedWindowT<CWindow> CContainedWindow;   

Remarks

CContainedWindow is a specialization of CContainedWindowT. If you want to change the base class or traits, use CContainedWindowT directly.

A specialization of CPathT using CString.

typedef CPathT<CString> CPath;   

A specialization of CPathT using CStringA.

typedef CPathT<CStringA> CPathA;   

A specialization of CPathT using CStringW.

typedef ATL::CPathT<CStringW> CPathW;   

Represents an array for storing simple types.

#define CSimpleValArray CSimpleArray   

Remarks

CSimpleValArray is provided for creating and managing arrays containing simple data types. It is a simple #define of CSimpleArray.

A pointer to a constant CUrl object.

typedef const CUrl* LPCURL;   

A pointer to a CUrl object.

typedef CUrl* LPURL;   

ATL COM Desktop Components
Functions
Global Variables
Structures
Macros
Classes

Show: