如何取得 MTS 中一个组件的实例?
现在我有一个组件,它运行在一台服务器上;同时在客户端的 ActiveX 内我想与此组件通讯,也就是说我想取得此组件的服务器实例.这样我就可以得到服务器上此组件的相关数据。
我现在试图以如下方式完成:
CLSIDFromProgID(...) ----- get component class id
CoCreateInstance( ... ) ----- get relative component dispatch interface
pDispatch->GetIDsofNames( ... ) --- get id of some method
... construct parameters and others
pDispatch->Invoke( id of method,...,parameter,...) ----calling relative method & return necessary result.
I'm trying, but i don't know if it works.
谁知道如何处理这个问题或者哪里有相关例子,请告知.
谢谢!