冠冕堂皇

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

异常信息:

发生了 System.Runtime.InteropServices.COMException
  Message="没有注册类别 (异常来自 HRESULT:0x80040154 (REGDB_E_CLASSNOTREG))"
  Source="ControlEase.OpcClient"
  ErrorCode=-2147221164
  StackTrace:
       在 Opc.IOPCServerList.GetClassDetails(Guid& clsid, String& ppszProgID, String& ppszUserType)
       在 Opc.OpcServerBrowser.ListAll(Guid catid, OpcServerInfo[]& serverslist, String nodeName)
  InnerException:

 

异常发生在枚举本机所有OPC2.0服务器的时候。

ifList.GetClassDetails( ref tempList[ i ].ClsID,
                            out tempList[ i ].ProgID, out tempList[ i ].ServerName )

其中ClsID的值为:a05bb6d5-2f8a-11d1-9bb0-080009d01446

运行regedit打开注册表编辑器,Ctrl+F搜索:a05bb6d5-2f8a-11d1-9bb0-080009d01446

结果显示如图:

因为之前卸载过RSLinx OPC Server,故报错。

 

posted on 2013-03-28 21:56  冠冕堂皇  阅读(3934)  评论(0编辑  收藏  举报