Question

The .NET Thread class has a handy function GetApartmentState() that returns the apartment of context of the thread. Is there a similar Co<something-something> function for native code (C++, C)? I feel like I should know, since I've been programming COM for almost 10 years, but I cannot find the answer.

Was it helpful?

Solution

The function you're looking for is CoGetApartmentType.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top