OnDisconnect Event (IServerDisconnect Interface)

                

 

This event occurs when a server becomes disconnected, either through an explicit Close or when a PI-SDK call to the server determines the connection has been lost. Signing up for this event in Visual Basic is done through the IServerDisconnect interface using the DisconnectEvents property.

Syntax

object.OnDisconnect

Private Sub object_OnDisconnect(ByVal theServer As Server)

The OnDisconnect event syntax has these parts:

Part

Description

object

 An object expression that evaluates to a ServerEvents object.

theServer

A Server object of the server that has been disconnected

Remarks

This event, unlike other Server events (OnOpen, OnClose) in Visual Basic is accessed through a property of a separate secondary interface IServerDisconnect.DisconnectEvents rather than the Events property.  This interface is available from both the Server object and the Servers collection. 

Enabling Operational Intelligence