ADSSession class
The StartService method starts the Arcana Scheduler service on the target computer (the computer on which the session was instantiated).
C++ |
hr=session->StartService() |
VB |
session.StartService |
StartService will return ADS_E_SERVICE_NOT_RUNNING if it is unable to start the service (see the Remarks section below). Any other error code returned by the method is an error from the system's service control manager. See the Error Codes topic for information on interpreting system errors.
The StartService method uses the Windows API functions OpenSCManager, OpenService, and StartService functions to start the Arcana Scheduler service. For information on these functions and on diagnosing problems with them, see the Windows Platform SDK.
After instructing the service control manager to start the service, the method will wait up to 120 seconds for the service to start. If the service does not start within this time, the method will return ADS_E_SERVICE_NOT_RUNNING. The service should start within a few seconds; a failure to start within two minutes generally will indicate a problem with the service or the target computer.