Options, ATL Simple Object Wizard


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 Options, ATL Simple Object Wizard.

Use this page of the ATL Simple Object Wizard to design for increased efficiency and error support for the object.

For more information on ATL projects and ATL COM classes, see ATL COM Desktop Components.

Threading model
Indicates the method for managing threads. By default, the project uses Apartment threading.

See Specifying the Project's Threading Model for more information.

SingleSpecifies that the object always runs in the primary COM thread. See Single-Threaded Apartments and InprocServer32 for more information.
ApartmentSpecifies that the object uses apartment threading. Equivalent to single thread apartment. Each object of an apartment-threaded component is assigned an apartment for its thread, for the life of the object; however, multiple threads can be used for multiple objects. Each apartment is tied to a specific thread and has a Windows message pump (default).

See Single-Threaded Apartments for more information.
BothSpecifies that the object can use either apartment or free threading, depending from which kind of a thread it is created.
FreeSpecifies that the object uses free threading. Free threading is equivalent to a multithread apartment model. See Multithreaded Apartments for more information.
Neutral (Windows 2000 only)Specifies that the object follows the guidelines for multithreaded apartments, but it can execute on any kind of thread.

Indicates whether the object uses aggregation. The aggregate object chooses which interfaces to expose to clients, and the interfaces are exposed as if the aggregate object implemented them. Clients of the aggregate object communicate only with the aggregate object.

YesSpecifies that the object can be aggregated. The default.
NoSpecifies that the object is not aggregated.
OnlySpecifies that the object must be aggregated.

Indicates the type of interface the object supports. By default, the object supports a dual interface.

DualSpecifies that the object supports a dual interface (its vtable has custom interface functions plus late-binding IDispatch methods). Allows both COM clients and Automation controllers to access the object. The default.
CustomSpecifies that the object supports a custom interface (its vtable has custom interface functions). A custom interface can be faster than a dual interface, especially across process boundaries.

- Automation compatible Allows Automation controllers to access an object that has the custom interface support.

Indicates additional support for the object.

ISupportErrorInfoCreates support for the ISupportErrorInfo interface so the object can return error information to the client.
Connection pointsEnables connection points for your object by making your object's class derive from IConnectionPointContainerImpl.
Free-threaded marshalerCreates a free-threaded marshaler object to marshal interface pointers efficiently between threads in the same process. Available to object specifying Both as the threading model.
IObjectWithSite (IE object support)Implements IObjectWithSiteImpl, which provides a simple way to support communication between an object and its site in a container.

ATL Simple Object Wizard
ATL Simple Object
In-Process Server Threading Issues