CoInitializeEx?

Hi,
could someone from Xojo, Inc. clarify what Xojo uses for CoInitializeEx?

What is set in main thread?
What is set for xojo threads? Do you call CoUninitialize on the end of a thread?
Do you call OleInitialize somewhere?

Do you use COINIT_MULTITHREADED and/or COINIT_APARTMENTTHREADED?

Some Windows APIs expect certain CoInitializeEx modes and OleInitialize.

PS: Please document what you set as those information may be important for people using declares or writing plugins.

Currently we initialize COM as apartment threaded, same with threads. We do this early so there’s no way for you to override it once the concurrency model is chosen. We had fully intended to defer the initialization such that the user could setup their preferred concurrency model in App.Open for example (threads would then inherit this model too), but apparently that never happened (but should at some point). We had thought about making this a build option too, but that didn’t sit well.

Well, at least I have windows functions which only work if you use COINIT_MULTITHREADED, so for me it’s a problem. Not sure how to solve.

Please document the current behavior at least.