Single-threaded apartments | STA | COM serializes calls between apartments through a Windows message loop. | CoInitializeEx(NULL, COINIT_APARTMENTTHREADED) |
Multi-threaded apartments | MTA | Serialization is not provided by COM, instead COM-components are expected to provide their own synchronization. | CoInitializeEx(NULL, COINIT_MULTITHREADED) |
Neutral-threaded apartments | NTA | Windows 2000 only |
System.Thrading.ApartmentState
enum. ThreadingModel
under the registry key HKEY_CLASSES_ROOT\CLSID\{GUID}\InprocServer32
-STA
and -MTA
.