COM 如何在线程里使用
在做一个关于OPC 的客户端需要用到com 原来也接触的少。
我定义了一个全局的变量 static COPCServer *opcServer; 在一个按钮下链接了它想开一个线程判断服务器的状态
使用它类下的 opcServer->getStatus(status); 函数失败返回
RPC_E_WRONG_THREAD The application called an interface that was marshalled 这个错误在网上找了些资料说是使用
CoMarshalInterThreadInterfaceInStream(IID_ICircle, opcServer->getServer(), &pStream); 但是pStream 返回null 无解啦求助啊
要怎么解决