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()
运行环境 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()