COM object methods are not executed on the thread that CoInitialize-d and created the object

后端 未结 5 1458
春和景丽
春和景丽 2021-01-01 05:26

I am developing an UI application that creates a COM object along the way. The problem is, I want to \"move\" this COM object entirely on a different thread.

What I

5条回答
  •  耶瑟儿~
    2021-01-01 05:42

    The threads are running in parallel and that's what they are meant to do. you need to synchronize between the two threads if you want one object to wait for some operation on other thread to complete. Event object will serve for your purpose.

提交回复
热议问题