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 编程语言的扩展而创建,除了用于低级别内存操作的功能外,还具有面向对象、泛型和功能性等特点。
90 个问题
{count} 票