On Mon, 11 Dec 2023 19:24:34 GMT, Alexey Ivanov <aiva...@openjdk.org> wrote:

>How come? It can't change: once COM is initialised on a thread, its threading 
>model cannot be changed. This is what RPC_E_CHANGED_MODE error code conveys, 
>in other words you request initialising COM in a threading model that's 
>different the model COM has been initialised previously.

Hmm for some reason after reading this doc I decided that the transition from 
STA to MTA is possible:
https://learn.microsoft.com/en-us/windows/win32/api/combaseapi/nf-combaseapi-coinitializeex
>RPC_E_CHANGED_MODE:
>A previous call to 
>[CoInitializeEx](https://learn.microsoft.com/en-us/windows/desktop/api/combaseapi/nf-combaseapi-coinitializeex)
> specified the concurrency model for this thread as multithread apartment 
>(MTA). This could also indicate that a change from neutral-threaded apartment 
>to single-threaded apartment has occurred.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/17010#issuecomment-1850851946

Reply via email to