To create a local or network service reference from the client side:
Construct a TLocalObjectName object using the name of the service.
Define the name of the service by instantiating a TLocalObjectType and passing this into the TLocalObjectName constructor.
This example defines a service name of File Server:
Instantiate a service reference class as appropriate to the service the client wants to connect to.
If the service is a local service, instantiate a TLocalServiceReference. For network services, instantiate a TNetworkServiceReference. Pass the service name into the service reference constructor.
This code instantiates a local service reference using the service name defined in the previous step: