description | title | ms.date | f1_keywords | helpviewer_keywords | ms.assetid | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Learn more about: ATL Typedefs |
ATL Typedefs |
11/04/2016 |
|
|
7dd05baa-3efb-4e3b-af23-793c610f4560 |
The Active Template Library includes the following typedefs.
Typedef | Description |
---|---|
_ATL_BASE_MODULE | Defined as a typedef based on _ATL_BASE_MODULE70. |
_ATL_COM_MODULE | Defined as a typedef based on _ATL_COM_MODULE70. |
_ATL_MODULE | Defined as a typedef based on _ATL_MODULE70. |
_ATL_WIN_MODULE | Defined as a typedef based on _ATL_WIN_MODULE70 |
ATL_URL_PORT | The type used by CUrl for specifying a port number. |
CComDispatchDriver | This class manages COM interface pointers. |
CComGlobalsThreadModel | Calls the appropriate thread model methods, regardless of the threading model being used. |
CComObjectThreadModel | Calls the appropriate thread model methods, regardless of the threading model being used. |
CContainedWindow | This class is a specialization of CContainedWindowT . |
CPath | A specialization of CPathT using CString . |
CPathA | A specialization of CPathT using CStringA . |
CPathW | A specialization of CPathT using CStringW . |
CSimpleValArray | Represents an array for storing simple types. |
DefaultThreadTraits | The default thread traits class. |
LPCURL | A pointer to a constant CUrl object. |
LPURL | A pointer to a CUrl object. |
Defined as a typedef based on _ATL_BASE_MODULE70.
typedef ATL::_ATL_BASE_MODULE70 _ATL_BASE_MODULE;
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.
Header: atlcore.h
Defined as a typedef based on _ATL_COM_MODULE70.
typedef ATL::_ATL_COM_MODULE70 _ATL_COM_MODULE;
Used by ATL projects which use COM features. Based on _ATL_COM_MODULE70.
Header: atlbase.h
Defined as a typedef based on _ATL_MODULE70.
typedef ATL::_ATL_MODULE70 _ATL_MODULE;
Header:
Based on _ATL_MODULE70.
Defined as a typedef based on _ATL_WIN_MODULE70.
typedef ATL::_ATL_WIN_MODULE70 _ATL_WIN_MODULE;
Used by any ATL projects which use windowing features. Based on _ATL_WIN_MODULE70.
Header: atlbase.h
The type used by CUrl for specifying a port number.
typedef WORD ATL_URL_PORT;
Header: atlutil.h
This class manages COM interface pointers.
typedef CComQIPtr<IDispatch, &__uuidof(IDispatch)> CComDispatchDriver;
Header: atlbase.h
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
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.
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:
typedef | Single threading | Apartment threading | Free threading |
---|---|---|---|
CComObjectThreadModel |
S | S | M |
CComGlobalsThreadModel |
S | M | M |
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.
Header: atlbase.h
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
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.
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:
typedef | Single threading | Apartment threading | Free threading |
---|---|---|---|
CComObjectThreadModel |
S | S | M |
CComGlobalsThreadModel |
S | M | M |
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.
Header: atlbase.h
This class is a specialization of CContainedWindowT
.
typedef CContainedWindowT<CWindow> CContainedWindow;
Header: atlwin.h
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;
Header: atlpath.h
A specialization of CPathT using CStringA
.
typedef CPathT<CStringA> CPathA;
Header: atlpath.h
A specialization of CPathT using CStringW
.
typedef ATL::CPathT<CStringW> CPathW;
Header: atlpath.h
Represents an array for storing simple types.
#define CSimpleValArray CSimpleArray
CSimpleValArray
is provided for creating and managing arrays containing simple data types. It is a simple #define of CSimpleArray.
Header: atlsimpcoll.h
A pointer to a constant CUrl object.
typedef const CUrl* LPCURL;
Header: atlutil.h
The default thread traits class.
#if defined(_MT)
typedef CRTThreadTraits DefaultThreadTraits;
#else
typedef Win32ThreadTraits DefaultThreadTraits;
#endif
If the current project uses the multithreaded CRT, DefaultThreadTraits is defined as CRTThreadTraits. Otherwise, Win32ThreadTraits is used.
Header: atlbase.h
A pointer to a CUrl object.
typedef CUrl* LPURL;
Header: atlutil.h
ATL COM Desktop Components
Functions
Global Variables
Classes and structs
Macros