[Visual Basic 6.0]The following code demonstrates using GetConfigurationStatus and the InstancesInUse property to verify no instances of a configuration are in use before stopping it:
D
im pGISServerConnection As IGISServerConnection
Set pGISServerConnection = New GISServerConnection
pGISServerConnection.Connect "melange"
Dim pServerObjectAdmin As IServerObjectAdmin
Set pServerObjectAdmin = pGISServerConnection.ServerObjectAdmin
Dim pSOCStatus As IServerObjectConfigurationStatus
Set pSOCStatus = pServerObjectAdmin.GetConfigurationStatus("RedlandsMap", "MapServer")
If pSOCStatus.InstanceInUseCount = 0 Then
pServerObjectAdmin.StopConfiguration "MyMapServer", "RedlandsMap"
End If
[Visual Basic .NET, C#, C++]
No example is available for Visual Basic .NET, C#, or C++. To view a Visual Basic 6.0 example, click the Language Filter button
in the upper-left corner of the page.