PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
This content has been translated automatically. Click here to view the French version.
  • EndService and EndProgram functions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Ends the execution of the current service.
Remark: This function only affects the "Service execution (called in loop)" event
Example
// --- Exécution du service (appelé en boucle)
 
// Exécution du service
ExécutionService()
// Pause de 60 secondes
ServiceWait(6000)
 
CASE EXCEPTION:
// En cas d'exception, ajoute une erreur dans le journal des événements
ServiceWriteEventLog(ExceptionInfo, elError)
// Arrête le service
EndService(esFailure)
Syntax
EndService([<Ending option>])
<Ending option>: Optional Integer constant
The options for ending a service are:
esStop
(default value)
The different ending codes are run and the service stops.
esFailureThe different ending codes are not run and the service stops while triggering a failure.
Windows In Windows, the management of failures is performed according to the parameters specified when installing the service. See the Department variable and the ServiceInstall function for more details.
Remarks

EndService and EndProgram functions

In a service:
  • The function EndService allows you to end the execution of the service by performing the following operations:
    • configuring the execution of the closing codes
    • simulating a service failure, which triggers OS failure recovery actions (automatic restart, or reboot in Windows, for example).
  • EndProgram can be used with the following specific features:
    • the message is ignored.
    • closing codes are run (or not) depending on the boolean specified as the last parameter.
    • the service ends normally and no failure is simulated.
In an application, EndService can be used with the following specific features:
  • no message is displayed when exiting the application.
  • closing codes are run (or not) depending on the specified closing option.
  • the failure option has no effect.
Component: wd270vm.dll
Minimum version required
  • Version 15
This page is also available for…
Comments
Click [Add] to post a comment