您的位置:首页 > 其它

COM线程模型

2017-11-14 10:29 459 查看
《COM线程模型》中已经说明,接口指针是线程相关,虽然逻辑上指向同一个对象,但不同的线程由于代理对象的原因而实际获得的接口指针也是不同的。但由于逻辑上是同一个对象,可以有一种接口的中立形式,与线程无关,唯一表示真正的接口指针。CoMarshalInterThreadInterfaceInStream和CoGetInterfaceAndReleaseStream可以实现跨线程接口共享。如果不对接口进行共享处理,你对接口的调用可能会出现“0x8001010e
应用程序调用一个已为另一线程整理的界面”。

2017-11-14 15:34:33 0195: <SOPCC_ConnectToServer> CoMarshalInterThreadInterfaceInStream, Ret:0x0-Address:0x106dcc

2017-11-14 15:34:33 0200: <SOPCC_ConnectToServer> 【Server5.OPC3.String】 call completed, Ret:0x0.

2017-11-14 15:34:33 0201: <SOPCC_ConnectToServer> CoGetInterfaceAndReleaseStream, Ret:0x0-Address:0x1030fc

2017-11-14 15:34:33 0201: <SOPCC_ConnectToServer::CoCreateInstanceEx IUnknown pointer address 0x1030fc

2017-11-14 15:34:43 0632: <SOPCC_ConnectToServer> CoMarshalInterThreadInterfaceInStream, Ret:0x0-Address:0x131d54

2017-11-14 15:34:43 0634: <SOPCC_ConnectToServer> 【Server3.OPC1.JNT3001_T3002】 call completed, Ret:0x0.

2017-11-14 15:34:43 0634: <SOPCC_ConnectToServer> CoGetInterfaceAndReleaseStream, Ret:0x0-Address:0x131c64

2017-11-14 15:34:43 0634: <SOPCC_ConnectToServer::CoCreateInstanceEx IUnknown pointer address 0x131c64
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  COM线程