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++
开发人员技术 | C++
一种通用的高级编程语言,作为 C 编程语言的扩展而创建,除了用于低级别内存操作的功能外,还具有面向对象、泛型和功能性等特点。
{count} 票

你的答案

提问者可以将答案标记为“已接受”,版主可以将答案标记为“已推荐”,这有助于用户了解答案是否解决了提问者的问题。