godsharp / opcsample

Opc Sample
https://godsharp.github.io/opcsample/
35 stars 14 forks source link

Unable to cast object,group订阅错误 #1

Closed symenzhang closed 3 years ago

symenzhang commented 3 years ago

运行环境 windows xp professional 2002 sp 3 .net framework 4.0

程序集 GodSharp.Opc.Da.OpcAutomation, Version=2021.204.23.0,

System.InvalidCastException: Unable to cast object of type 'OPCAutomation.OPCServerClass' to type 'OPCAutomation.IOPCGroups'. at System.StubHelpers.InterfaceMarshaler.ConvertToManaged(IntPtr pUnk, IntPtr itfMT, IntPtr classMT, Int32 flags) at OPCAutomation.OPCServerClass.get_OPCGroups() at GodSharp.Opc.Da.OpcAutomationClient.CreateSubscription(Group group) at GodSharp.Opc.Da.OpcDaClient.Add(Group group) at GodSharp.Opc.Da.OpcDaClient.Connect()