APTTYPEQUALIFIER enumeration

Specifies the set of possible COM apartment type qualifiers.

Syntax


typedef enum  { 
  APTTYPEQUALIFIER_NONE                = 0,
  APTTYPEQUALIFIER_IMPLICIT_MTA        = 1,
  APTTYPEQUALIFIER_NA_ON_MTA           = 2,
  APTTYPEQUALIFIER_NA_ON_STA           = 3,
  APTTYPEQUALIFIER_NA_ON_IMPLICIT_MTA  = 4,
  APTTYPEQUALIFIER_NA_ON_MAINSTA       = 5
} APTTYPEQUALIFIER;

Constants

APTTYPEQUALIFIER_NONE

No qualifier information for the current COM apartment type is available.

APTTYPEQUALIFIER_IMPLICIT_MTA

This qualifier is only valid when the pAptType parameter of the CoGetApartmentType function specifies APTTYPE_MTA on return. A thread has an implicit MTA apartment type if it does not initialize the COM apartment itself, and if another thread has already initialized the MTA in the process. This qualifier informs the API caller that the MTA of the thread is implicitly inherited from other threads and is not initialized directly.

APTTYPEQUALIFIER_NA_ON_MTA

This qualifier is only valid when the pAptType parameter of the CoGetApartmentType function contains APTTYPE_NA on return. When an MTA thread creates or invokes a COM in-process object using the "Neutral" threading model, the COM apartment type of the thread switches from MTA to a Neutral apartment type. This qualifier informs the API caller that the thread has switched from the MTA apartment type to the NA type.

APTTYPEQUALIFIER_NA_ON_STA

This qualifier is only valid when the pAptType parameter of the CoGetApartmentType function contains APTTYPE_NA on return. When an STA thread creates or invokes a COM in-process object using the "Neutral" threading model, the COM apartment type of the thread switches from STA to a Neutral apartment type. This qualifier informs the API caller that the thread has switched from the STA apartment type to the NA type.

APTTYPEQUALIFIER_NA_ON_IMPLICIT_MTA

This qualifier is only valid when the pAptType parameter of the CoGetApartmentType function contains APTTYPE_NA on return. When an implicit MTA thread creates or invokes a COM in-process object using the "Neutral" threading model, the COM apartment type of the thread switches from the implicit MTA type to a Neutral apartment type. This qualifier informs the API caller that the thread has switched from the implicit MTA apartment type to the NA type.

APTTYPEQUALIFIER_NA_ON_MAINSTA

This qualifier is only valid when the pAptType parameter of the CoGetApartmentType function contains APTTYPE_NA on return. When the main STA thread creates or invokes a COM in-process object using the "Neutral" threading model, the COM apartment type of the thread switches from the main STA type to a Neutral apartment type. This qualifier informs the API caller that the thread has switched from the main STA apartment type to the NA type.

Requirements

Minimum supported client

Windows 7 [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 R2 [desktop apps | Windows Store apps]

Header

Objidl.h

See also

CoGetApartmentType

 

 

Community Additions

ADD
Show:
© 2014 Microsoft