2012-03-16 125 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");