GetServersListed

(RPC Manager Library)

Description: This subroutine returns a one-dimensional array of the names or IPs of the servers that has been derived from the "-Servers" section of the service configuration file.
Returns: Array
Usage: Script or steady state.
Function Groups: Network
Related to: ConnectToMachine | DisconnectFromMachine | GetGUID | GetServer | GetStatus | IsClient | IsPotentialServer | IsPrimaryServer | Register (RPC Manager) | Send | SetRemoteValue
Format: \RPCManager.GetServersListed(ServiceName [, OptGUID])
Parameters:  
ServiceName
Required. Any text expression giving the name of the service for which to get the list of servers.
OptGUID
An optional parameter that is any expression giving the 16-byte binary form of the globally unique identifier (GUID) for the application in which the service instance is located. The default is the application to which the caller belongs.
Comments:

This subroutine is a member of the RPC Manager's Library, and must therefore be prefaced by \RPCManager\, as shown in the "Format" section. If the application you are developing is a script application, the subroutine call must be prefaced by System\RPCManager\, and the System variable must be declared in AppRoot.src.
The return value from this subroutine is a list of the text names for all workstations listed as servers.
If the 16-byte binary format of the GUID is not known, the GetGUID function may be used to obtain it.

 

To obtain a list of service names for your application, open the Trace Viewer Application, connect to RPC Diagnostics, then open the Services Dialog

Example:

  If 1 Main;
  [
    sList = \RPCManager\GetServersListed("ModemManager");
  ]

RPC Manager Service