发表于:2003-08-23 18:53:00
楼主
一个OPC DA VB程序(网上download的),编译出现“User-defined type not defined”
错误(注意:我已经添加了reference OPC Automation 2.0 )其代码如下:
Public OpcServer As IOPCServerDisp ‘OPC Server Object
Public OpcItemMgt As IOPCItemMgtDisp ’OPC Group Object
Public OpcItem As IOPCItemDisp ‘OPC Item Object
发现它与通常的代码不同,通常的DA client代码是这样的:
Dim WithEvents Myserver As OPCServer
Dim WithEvents Mygroup As OPCGroup
Dim WithEvents Mygroups As OPCGroups
Dim Myitem As OPCItem
Dim Myitems As OPCItems
Dim MyBrowser As OPCBrowser
哪位大侠能告诉我这是什么原因?是不是DA 1.0的接口?