The
CoGetApartmentType
function
returns two pieces of information,
documented as follows:
-
APTTYPE
enumeration value that specifies the type of the current apartment. -
APTTYPEQUALIFIER
enumeration value that specifies the type qualifier of the current apartment.
The possible combinations
can be deduced from the documentation for
APTTYPEQUALIFIER
,
but here they are in table form because people like tables.
Apartment Type | Qualifier | Meaning |
---|---|---|
STA | NONE | Single-threaded apartment |
MAINSTA | NONE | Main single-threaded apartment |
MTA | NONE | Multithreaded apartment, explicitly initialized |
MTA | IMPLICIT | Multithreaded apartment, implicitly initialized |
NA | NA_ON_STA | Neutral apartment entered on STA thread |
NA | NA_ON_MAINSTA | Neutral apartment entered on main STA thread |
NA | NA_ON_MTA | Neutral apartment entered on explicit MTA thread |
NA | NA_ON_IMPLICIT_MTA | Neutral apartment entered on implicit MTA thread |
More details can be found in
the documentation for APTTYPEQUALIFIER
.