OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
Using TServiceManager

The TServiceManager class encapsulates the service information functions.

It provides information about a service given its name or port number and a specific protocol. The information can be retrieved in either blocking mode or non-blocking mode (see online help under blocking mode). The information is returned in the form of a TServiceEntry which encapsulates the Winsock servent structure.

For example, to retrieve the port number of the time service on the udp protocol in blocking mode, you would use the following code:

TServiceManager manager;
int port;
manager.GetServicePort("time", port, "udp");