AdvancedHMI Software
General Category => Support Questions => Topic started by: andrew_pj on June 09, 2015, 02:03:42 AM
-
Dear Archie,
I am using V398m, and OpcDACom communication protocol.
I got this InvalidComObjectException error 'sometimes', right after I execute Application.Exit()
It's actually not a major problem as in this case User wants to exit anyway.
But, it would be better if it's not happening at all.
Try
Application.Exit()
Catch ex As Exception
End Try
Please advise if you have explanation or trick to prevent this error.
Thank you.
Best regards,
Andrew
-
That is something down in the OPC Server wrapper, so I don't have any way of knowing exactly what it is. I would modify the code like this to ignore the exception:
If DLL.IsConnected Then
Try
DLL.Disconnect()
Catch
End Try
End If
-
So far no more error, Thanks.