The ServerShutDown event is fired when the server is planning on shutting down and wants to tell
all the active clients to release any resources. The client provides this method so that the server can
request that the client disconnect from the server. The client should remove all groups and items.
for the shutdown.
OPC Data Access Automation Specification2.02
Dim ARealOPCServer As String
Dim ARealOPCNodeName As String
Set AnOPCServer = New OPCServer ‘ note we need to specify an example to facilitate creating an
object that is
‘dimensioned with events
ARealOPCServer = “VendorX.DataAccessCustomServer”
ARealOPCNodeName = “SomeComputerNodeName”
AnOPCServer.Connect(ARealOPCServer, ARealOPCNodeName)
Private Sub AnOPCServer_ServerShutDown(ByRef aServerReason As String)
‘ write your client code here to let go of the server
End Sub
29
OPC Data Access Automation Specification2.02
Do'stlaringiz bilan baham: