ATL Macros Alphabetical Reference

 

In this section, reference topics for the ATL macros are organized alphabetically. To find a particular macro by category, see ATL Macros.

Macro

Description

_ATL_ALL_WARNINGS

A symbol which enables errors in projects converted from previous versions of ATL.

_ATL_APARTMENT_THREADED

Define if one or more of your objects use apartment threading.

_ATL_CSTRING_EXPLICIT_CONSTRUCTORS

Makes certain CString constructors explicit, preventing any unintentional conversions.

_ATL_DEBUG_INTERFACES

Define this macro before including any ATL header files to trace all AddRef and Release calls on your components' interfaces to the output window.

_ATL_DEBUG_QI

Writes all calls to QueryInterface to the output window.

_ATL_FREE_THREADED

Define if one or more of your objects use free or neutral threading.

_ATL_MIXED

Tells the compiler that your ATL application is comprised of native and /clr compilands.

_ATL_MULTI_THREADED

A symbol that indicates the project will have objects that are marked as Both, Free or Neutral. The macro _ATL_FREE_THREADED should be used in new code.

_ATL_NO_COM_SUPPORT

A symbol which prevents COM-related code from being compiled with your project.

_ATL_NO_AUTOMATIC_NAMESPACE

A symbol which prevents the default use of namespace as ATL.

_ATL_NO_VARIANT_THROW

Suppresses the CComVariant Class from throwing exceptions.

_ATL_SECURE_NO_WARNINGS

Suppresses compiler warnings for the use of deprecated ATL functions.

_ATL_STATIC_REGISTRY

A symbol that indicates you want the registration code for your object to be in the object to avoid a dependency on ATL.DLL.

_ATLCATCH

Statement(s) to handle errors occurring in the associated _ATLTRY

_ATLCATCHALL

Statement(s) to handle errors occurring in the associated _ATLTRY.

_ATLTRY

Marks a guarded code section where an error could possibly occur.

ATL_ESC Flags

These flags are used to control the behavior of EscapeXML.

ALT_MSG_MAP

Marks the beginning of an alternate message map.

ATL and MFC String Conversion Macros

String conversion macros valid for both ATL and MFC.

ATLASSERT

The ATLASSERT macro performs the same functionality as the _ASSERTE macro found in the C run-time library.

ATL_NOINLINE

A symbol that indicates a function should not be inlined.

ATL_NO_VTABLE

A symbol that prevents the vtable pointer from being initialized in the class's constructor and destructor.

ATL_URL Flags

These flags modify the behavior of AtlEscapeUrl and AtlCanonicalizeUrl.

ATL_URL_SCHEME

The members of this enumeration provide constants for the schemes understood by CUrl.

ATL_WORKER_THREAD_WAIT

This macro defines the default value in milliseconds that CWorkerThread::Shutdown will wait for the worker thread to shut down.

ATLS_DEFAULT_THREADPOOLSHUTDOWNTIMEOUT

This macro defines the default time in milliseconds that CThreadPool will wait for a thread to shut down.

ATLS_DEFAULT_THREADSPERPROC

This macro defines the default number of threads per processor used by CThreadPool.

ATLSMTP_QPENCODE Flags

These flags describe how quoted-printable encoding is to be performed by QPEncode.

ATLSMTP_UUENCODE Flags

These flags describe how uuencoding is to be performed by UUEncode.

ATLTRACE

Reports warnings to an output device, such as the debugger window, according to the indicated flags and levels. Included for backward compatibility.

ATLTRACE2

Reports warnings to an output device, such as the debugger window, according to the indicated flags and levels.

ATLTRACENOTIMPL

In debug builds of ATL, sends the string "funcname is not implemented" to the dump device and returns E_NOTIMPL.

BEGIN_CATEGORY_MAP

Marks the beginning of the category map.

BEGIN_COM_MAP

The COM map is the mechanism that exposes interfaces on an object to a client through QueryInterface.

BEGIN_CONNECTION_POINT_MAP

Marks the beginning of the connection point map entries.

BEGIN_EXTENSION_SNAPIN_NODEINFO_MAP

Marks the beginning of the snap-in extension data class map.

BEGIN_MSG_MAP

Marks the beginning of the default message map.

BEGIN_PROP_MAP

Marks the beginning of the object's property map.

BEGIN_RDX_MAP

Marks the beginning of the Registry Data Exchange map.

BEGIN_SERVICE_MAP

Marks the beginning of the service map.

BEGIN_SINK_MAP

Declares the beginning of the event sink map for the composite control.

BEGIN_SNAPINTOOLBARID_MAP

Declares the beginning of the toolbar ID map for the Snap-In object.

CHAIN_MSG_MAP

Defines an entry in a message map.

CHAIN_MSG_MAP_ALT

Defines an entry in a message map.

CHAIN_MSG_MAP_ALT_MEMBER

Defines an entry in a message map.

CHAIN_MSG_MAP_DYNAMIC

Defines an entry in a message map.

CHAIN_MSG_MAP_MEMBER

Defines an entry in a message map.

COM_INTERFACE_ENTRY Macros

These macros enter an object's interfaces into its COM map so that they can be accessed by QueryInterface.

COM_INTERFACE_ENTRY

Enters interfaces into the COM interface map.

COM_INTERFACE_ENTRY2

Use this macro to disambiguate two branches of inheritance.

COM_INTERFACE_ENTRY2_IID

Same as COM_INTERFACE_ENTRY2, except you can specify a different IID.

COM_INTERFACE_ENTRY_AGGREGATE

When the interface identified by iid is queried for, COM_INTERFACE_ENTRY_AGGREGATE forwards to punk.

COM_INTERFACE_ENTRY_AGGREGATE_BLIND

Same as COM_INTERFACE_ENTRY_AGGREGATE, except that querying for any IID results in forwarding the query to punk.

COM_INTERFACE_ENTRY_AUTOAGGREGATE

Same as COM_INTERFACE_ENTRY_AGGREGATE, except if punk is NULL, it automatically creates the aggregate described by the clsid.

COM_INTERFACE_ENTRY_AUTOAGGREGATE_BLIND

Same as COM_INTERFACE_ENTRY_AUTOAGGREGATE, except that querying for any IID results in forwarding the query to punk, and if punk is NULL, automatically creating the aggregate described by the clsid.

COM_INTERFACE_ENTRY_BREAK

Causes your program to call DebugBreak when the specified interface is queried for.

COM_INTERFACE_ENTRY_CACHED_TEAR_OFF

Saves the interface-specific data for every instance.

COM_INTERFACE_ENTRY_CHAIN

Processes the COM map of the base class when the processing reaches this entry in the COM map.

COM_INTERFACE_ENTRY_FUNC

A general mechanism for hooking into ATL's QueryInterface logic.

COM_INTERFACE_ENTRY_FUNC_BLIND

Same as COM_INTERFACE_ENTRY_FUNC, except that querying for any IID results in a call to func.

COM_INTERFACE_ENTRY_IID

Use this macro to enter the interface into the COM map and specify its IID.

COM_INTERFACE_ENTRY_NOINTERFACE

Returns E_NOINTERFACE and terminates COM map processing when the specified interface is queried for.

COM_INTERFACE_ENTRY_TEAR_OFF

Exposes your tear-off interfaces.

COMMAND_CODE_HANDLER

Similar to COMMAND_HANDLER, but maps a WM_COMMAND message based only on the notification code.

COMMAND_HANDLER

Defines an entry in a message map.

COMMAND_ID_HANDLER

Similar to COMMAND_HANDLER, but maps a WM_COMMAND message based only on the identifier of the menu item, control, or accelerator.

COMMAND_RANGE_CODE_HANDLER

Similar to COMMAND_RANGE_HANDLER, but maps WM_COMMAND messages with a specific notification code from a range of controls to a single handler function.

COMMAND_RANGE_HANDLER

Similar to COMMAND_HANDLER, but maps WM_COMMAND messages from a range of controls to a single handler function.

CONNECTION_POINT_ENTRY

Enters a connection point for the specified interface into the connection point map so that it can be accessed.

DECLARE_AGGREGATABLE

Specifies that your object can be aggregated.

DECLARE_CLASSFACTORY

Declares CComClassFactory to be the class factory.

DECLARE_CLASSFACTORY2

Declares CComClassFactory2 to be the class factory.

DECLARE_CLASSFACTORY_AUTO_THREAD

Declares CComClassFactoryAutoThread to be the class factory.

DECLARE_CLASSFACTORY_EX

Declares cf to be the class factory.

DECLARE_CLASSFACTORY_SINGLETON

Declares CComClassFactorySingleton to be the class factory.

DECLARE_EMPTY_MSG_MAP

Declares an empty message map.

DECLARE_GET_CONTROLLING_UNKNOWN

Declares a virtual function GetControllingUnknown.

DECLARE_LIBID

Provides a way for ATL to obtain the libid of the type library.

DECLARE_NO_REGISTRY

Use DECLARE_NO_REGISTRY if you want to avoid any default ATL registration for the class in which this macro appears.

DECLARE_NOT_AGGREGATABLE

Specifies that your object cannot be aggregated.

DECLARE_OBJECT_DESCRIPTION

Allows you to specify a text description for your class object.

DECLARE_OLEMISC_STATUS

Used in ATL ActiveX controls to set the OLEMISC flags.

DECLARE_ONLY_AGGREGATABLE

Specifies that your object must be aggregated.

DECLARE_POLY_AGGREGATABLE

Specifies that an instance of CComPolyObject < x > is created when your object is created.

DECLARE_PROTECT_FINAL_CONSTRUCT

Protects your object from being deleted if (during FinalConstruct) the internal aggregated object increments the reference count then decrements the count to 0.

DECLARE_REGISTRY

Enters the standard class registration into the system registry or removes it from the system registry.

DECLARE_REGISTRY_APPID_RESOURCEID

Specifies the information required to automatically register the appid.

DECLARE_REGISTRY_RESOURCE

Gets the named resource containing the registry file and runs the script to either enter objects into the system registry or remove them from the system registry.

DECLARE_REGISTRY_RESOURCEID

Same as DECLARE_REGISTRY_RESOURCE except that it uses a wizard-generated UINT to identify the resource, rather than a string name.

DECLARE_VIEW_STATUS

Place this macro in an ATL ActiveX control's control class to specify the VIEWSTATUS flags to the container.

DECLARE_WND_CLASS

Allows you to specify the name of a new window class. Place this macro in an ATL ActiveX control's control class.

DECLARE_WND_CLASS_EX

Allows you to specify the name of an existing window class on which a new window class will be based. Place this macro in an ATL ActiveX control's control class.

DECLARE_WND_SUPERCLASS

Allows you to specify the parameters of a class. Place this macro in an ATL ActiveX control's control class.

DEFAULT_REFLECTION_HANDLER

Provides a default handler for the child window (control) that will receive reflected messages; the handler will properly pass unhandled messages to DefWindowProc.

DEVMODE and TEXTMETRIC String Conversion Macros

These macros create a copy of a DEVMODE or TEXTMETRIC structure and convert the strings within the new structure to a new string type.

END_CATEGORY_MAP

Marks the end of the category map.

END_COM_MAP

Ends the definition of your COM interface map.

END_CONNECTION_POINT_MAP

Marks the end of the connection point map entries.

END_EXTENSION_SNAPIN_NODEINFO_MAP

Marks the end of the snap-in extension data class map.

END_MSG_MAP

Marks the end of a message map.

END_PROP_MAP

Marks the end of the object's property map.

END_RDX_MAP

Marks the end of the Registry Data Exchange map.

END_SERVICE_MAP

Marks the end of the service map.

END_SINK_MAP

Declares the end of the event sink map for the composite control.

END_SNAPINTOOLBARID_MAP

Declares the end of the toolbar ID map for the Snap-In object.

EXTENSION_SNAPIN_DATACLASS

Adds a data member to the snap-in extension data class for an ISnapInItemImpl-derived class.

EXTENSION_SNAPIN_NODEINFO_ENTRY

Adds a snap-in extension data class to the snap-in extension data class map.

FORWARD_NOTIFICATIONS

Forwards notification messages to the parent window.

IMPLEMENTED_CATEGORY

Add an IMPLEMENTED_CATEGORY macro to your component's category map to specify that it should be registered as implementing the category identified by the catID parameter.

MESSAGE_HANDLER

Defines an entry in a message map.

MESSAGE_RANGE_HANDLER

Similar to MESSAGE_HANDLER, but maps a range of Windows messages to a single handler function.

NOTIFY_CODE_HANDLER

Similar to NOTIFY_HANDLER, but maps a WM_NOTIFY message based only on the notification code.

NOTIFY_HANDLER

Defines an entry in a message map.

NOTIFY_ID_HANDLER

Similar to NOTIFY_HANDLER, but maps a WM_NOTIFY message based only on the control identifier.

NOTIFY_RANGE_CODE_HANDLER

Similar to NOTIFY_RANGE_HANDLER, but maps WM_NOTIFY messages with a specific notification code from a range of controls to a single handler function.

NOTIFY_RANGE_HANDLER

Similar to NOTIFY_HANDLER, but maps WM_NOTIFY messages from a range of controls to a single handler function.

OBJECT_ENTRY_AUTO

Enters an ATL object into the object map, updates the registry, and creates an instance of the object.

OBJECT_ENTRY_NON_CREATEABLE_EX_AUTO

Allows you to specify that the object should be registered and initialized, but it should not be externally creatable via CoCreateInstance.

PROP_DATA_ENTRY

Indicates the extent, or dimensions, of an ActiveX control.

PROP_ENTRY_INTERFACE

Use this macro to enter a property description, property DISPID, and list of property page CLSID's into the property map for the object.

PROP_ENTRY_INTERFACE_CALLBACK

Use this macro to enter a property description, property DISPID, and provide a callback function to determine if any CLSID should be added to the property map.

PROP_ENTRY_INTERFACE_CALLBACK_EX

Similar to PROP_ENTRY_INTERFACE_CALLBACK, but allows you to specify a particular IID If your object supports multiple dual interfaces.

PROP_ENTRY_INTERFACE_EX

Similar to PROP_ENTRY_INTERFACE, but allows you to specify a particular IID If your object supports multiple dual interfaces.

PROP_ENTRY_TYPE

Use this macro to enter a property description, property DISPID, and property page CLSID into the object's property map.

PROP_ENTRY_TYPE_EX

Similar to PROP_ENTRY_TYPE, but allows you specify a particular IID if your object supports multiple dual interfaces.

PROP_PAGE

Use this macro to enter a property page CLSID into the object's property map.

RDX_BINARY

Associates the specified registry entry with a specified member variable of type BYTE.

RDX_CSTRING_TEXT

Associates the specified registry entry with a specified member variable of type CString.

RDX_DWORD

Associates the specified registry entry with a specified member variable of type DWORD.

RDX_TEXT

Associates the specified registry entry with a specified member variable of type TCHAR.

REFLECT_NOTIFICATIONS

Reflects notification messages back to the child window (control) that sent them.

REFLECTED_COMMAND_CODE_HANDLER

Similar to COMMAND_CODE_HANDLER, but maps commands reflected from the parent window.

REFLECTED_COMMAND_HANDLER

Similar to COMMAND_HANDLER, but maps commands reflected from the parent window.

REFLECTED_COMMAND_ID_HANDLER

Similar to COMMAND_ID_HANDLER, but maps commands reflected from the parent window.

REFLECTED_COMMAND_RANGE_CODE_HANDLER

Similar to COMMAND_RANGE_CODE_HANDLER, but maps commands reflected from the parent window.

REFLECTED_COMMAND_RANGE_HANDLER

Similar to COMMAND_RANGE_HANDLER, but maps commands reflected from the parent window.

REFLECTED_NOTIFY_CODE_HANDLER

Similar to NOTIFY_CODE_HANDLER, but maps notifications reflected from the parent window.

REFLECTED_NOTIFY_HANDLER

Similar to NOTIFY_HANDLER, but maps notifications reflected from the parent window.

REFLECTED_NOTIFY_ID_HANDLER

Similar to NOTIFY_ID_HANDLER, but maps notifications reflected from the parent window.

REFLECTED_NOTIFY_RANGE_CODE_HANDLER

Similar to NOTIFY_RANGE_CODE_HANDLER, but maps notifications reflected from the parent window.

REFLECTED_NOTIFY_RANGE_HANDLER

Similar to NOTIFY_RANGE_HANDLER, but maps notifications reflected from the parent window.

REQUIRED_CATEGORY

Add a REQUIRED_CATEGORY macro to your component's category map to specify that it should be registered as requiring the category identified by the catID parameter.

SERVICE_ENTRY

Indicates that the object supports the service id specified by SID.

SERVICE_ENTRY_CHAIN

Instructs IServiceProviderImpl::QueryService to chain to the object specified by punk.

SINK_ENTRY

Declares the handler function (fn) for the specified event (dispid), of the control identified by id.

SINK_ENTRY_EX

Declares the handler function (fn) for the specified event (dispid), of the dispatch interface (iid), for the control identified by id.

SINK_ENTRY_INFO

Use the SINK_ENTRY_INFO macro within an event sink map to provide the information needed by IDispEventSimpleImpl to route events to the relevant handler function.

SNAPINMENUID

Use this macro to declare the context menu resource of the Snap-In object.

SNAPINTOOLBARID_ENTRY

Use this macro to enter a toolbar ID into the Snap-In object's toolbar ID map.

WM_FORWARDMSG

This macro forwards a message received by a window to another window for processing.

See Also

ATL Macros
ATL COM Desktop Components
ATL Functions
ATL Global Variables
ATL Structures
ATL Typedefs
ATL Class Overview