CoGetApartmentType function ole32

void CoGetApartmentType(
  1. Pointer<Int32> pAptType,
  2. Pointer<Int32> pAptQualifier
)

Returns the current apartment type and type qualifier.

Throws a WindowsException on failure.

To learn more, see learn.microsoft.com/windows/win32/api/combaseapi/nf-combaseapi-cogetapartmenttype.

Implementation

@pragma('vm:prefer-inline')
void CoGetApartmentType(Pointer<Int32> pAptType, Pointer<Int32> pAptQualifier) {
  final hr$ = HRESULT(_CoGetApartmentType(pAptType, pAptQualifier));
  if (hr$.isError) throw WindowsException(hr$);
}