COM external server: when call one interface ,cannot run in only one thread

Xingjian Hu 0 信誉分
2024-02-20T09:19:59.92+00:00

I am using a COM external executable that employs Single-Threaded Apartment (STA). However, when calling it from another program, the executing thread is not consistently fixed to the same thread. Upon inspecting all the threads, both the original thread and the suddenly changing thread IDs are present. My setup involves a loop, continuously invoking an interface of this external COM server.Is there an issue with my implementation, or is there an external problem?

开发人员技术 | C++
{count} 票

你的答案

问题作者可以将答案标记为“接受的答案”,这有助于用户了解已解决作者问题的答案。