I'm using a C++ DLL with python which makes use of COM objects. I'm loading it with cdll.LoadLibray.
My application was working fine with python 2.7. Now that I'm moving to Python 3.7 my C++ DLL fails when I call: CoInitializeEx(NULL,COINIT_MULTITHREADED)
with error 0x80010106: Cannot change thread mode after it is set.
By googling a bit I found some references on sys.coinit_flags = pythoncom.COINIT_MULTITHREADED
but this pieces of code does not solve the issue.
It seems Python 3 is initializing COM by itself and now I cannot change the COM concurrency model.
How can I enable COINIT_MULTITHREADED?