IComThreadEvents interface (comsvcs.h)

Notifies the subscriber if a single-threaded apartment (STA) is created or terminated, and when an apartment thread is allocated. The subscriber is also notified if an activity is assigned or unassigned to an apartment thread. The events are published to the subscriber using the COM+ Events service, a loosely coupled events system that stores event information from different publishers in an event store in the COM+ catalog.

Inheritance

The IComThreadEvents interface inherits from the IUnknown interface. IComThreadEvents also has these types of members:

Methods

The IComThreadEvents interface has these methods.

 
IComThreadEvents::OnThreadAssignApartment

Generated when an activity is assigned to an apartment thread.
IComThreadEvents::OnThreadBindToApartment

Generated when an apartment thread is allocated for a single-thread apartment (STA) thread that does not have an apartment thread to run in.
IComThreadEvents::OnThreadStart

Generated when a single-threaded apartment (STA) thread is started.
IComThreadEvents::OnThreadTerminate

Generated when a single-threaded apartment (STA) thread is terminated.
IComThreadEvents::OnThreadUnassignApartment

Generated when an activity is unassigned from an apartment thread.
IComThreadEvents::OnThreadUnBind

Generated when the lifetime of the configured component is over and the activity count on the apartment thread can be decremented.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header comsvcs.h

See also

COM+ Contexts and Threading Models

COM+ Events

COM+ Instrumentation