What do the output values from CoGetApartmentType mean?
CoGetApartmentType function returns two pieces of information, documented as follows:
APTTYPEenumeration value that specifies the type of the current apartment.
APTTYPEQUALIFIERenumeration 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.
|STA||APPLICATION_STA||Non-reentrant 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