Example: Removing the application name from FullServerName
The following sample code shows removing the application name from FullServerName.
Private Sub MyApp_ServiceDisruption(ByVal Area As String, ByVal ServerName As String, ByVal ComputerName As String) MsgBox "ServiceDisruption: " + Area + " " + ServerName + " " + ComputerName Dim FullServerName As String If Area = "" Then FullServerName = "FTDirectory" Else=2= Dim FixedArea As String x = InStr(Area, "/") If x > 0 Then FixedArea = Mid(Area, x) 'this removes the application name Else FixedArea = "/" End If FullServerName = FixedArea + ":" + ServerName End If Dim PrimaryStatus As gfxServerStatusConstants Dim SecondaryStatus As gfxServerStatusConstants Dim ActiveComputerName As String GetServerStatus FullServerName, PrimaryStatus, SecondaryStatus, ActiveComputerName MsgBox "ServiceDisruption: " + FullServerName + " " + ActiveComputerName End Sub
Provide Feedback