Method ServiceController():addController() Foundation
Registers a controller for sending control requests to a service.
:addController( <cName> , ;
[<cDispName>] , ;
[<cEXEName>] , ;
[<cUserAccnt>] , ;
[<cPassWord>] , ;
[<cParam>] , ;
[<oLogger>] ) --> lSuccess
The method calls the instance method :logSuccess() and returns .T. (true) when a new controller instance is created, otherwise it calls the instance method :logError() and .F. (false) is returned. This means that a controller with the passed name already exists.
One application may implement the control mechanism of an abitrary number of services. However, it must be ensured that there is only one controller for each service. This is done by the interface :addController() which registers a controller for the service whose names are passed. The method does not return the instance of the class but indicates whether a new service controller is created (return .T.) or if it already exists (return .F.). The controller instance can then be accessed by the method :getUpdatedControl().
When the controller is successfully registered, the service may be controlled by the class methods :install(), :start(), :stop(), :pause(), :continue(), and :uninstall() . All of these methods expect the name of the service to control.
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.