2012-03-16 111 views
0

我想连接自定义RTD客户端,用C#编写与第三方RTD服务器。RTD客户端与第三方RTD服务器:C#

Type rtd; 
Object rtdServer = null; 
rtd = Type.GetTypeFromProgID("ProgId","WS001"); 
rtdServer = Activator.CreateInstance(rtd); 

其中WS001是我的机器名,ProgId是RTD服务器名称。我得到这个错误,

Error: System.Runtime.InteropServices.COMException (0x800706BA): Retrieving the COM class factory for remote component with CLSID {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} from machine "WS001" failed due to the following error: 800706ba "WS001".`

我使用的是Windows 7 64位操作系统。

回答

0

如果WS001是你的本地计算机名称,然后再尝试其他的过载,这没有按用不了机器名称:

rtd = Type.GetTypeFromProgID("ProgId");