APTTYPE enumeration (objidlbase.h)

Specifies different types of apartments.

Syntax

typedef enum _APTTYPE {
  APTTYPE_CURRENT = -1,
  APTTYPE_STA = 0,
  APTTYPE_MTA = 1,
  APTTYPE_NA = 2,
  APTTYPE_MAINSTA = 3
} APTTYPE;

Constants

 
APTTYPE_CURRENT
Value: -1
The current thread.
APTTYPE_STA
Value: 0
A single-threaded apartment.
APTTYPE_MTA
Value: 1
A multithreaded apartment.
APTTYPE_NA
Value: 2
A neutral apartment.
APTTYPE_MAINSTA
Value: 3
The main single-threaded apartment.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps | UWP apps]
Minimum supported server Windows 2000 Server [desktop apps | UWP apps]
Header objidlbase.h (include Objidl.h)

See also

CoGetApartmentType

IComThreadingInfo::GetCurrentApartmentType