示例:从 FullServerName 移除应用程序名称

下列示例代码显示从 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
提供反馈
对本文档有问题或反馈吗? 请在这里提交您的反馈
Normal