Is there an API to determine COM apartment model?

Suppose you initialize COM with CoInitializeEx(NULL, COINIT_MULTITHREADED);

Is there a function which will tell if COM was intialized with COINIT_MULTITHREADED or COINIT_APARTMENTTHREADED?

Suppose you have a class which branches it's work depending on apparment model, therefore it should determine that bit first.

I know we could call the function for the second time and then based on result figure it out (followed by CoUnitilize), but surely there must be a cleaner way to do it.
Last edited on
Nice, this is exactly what I need.
Last edited on
Topic archived. No new replies allowed.