ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Standard functions / Service functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
ServiceStatus (Function)
In french: ServiceEtat
Returns the current status of a service. This service can be found on the local computer or on a remote computer.
// Renvoie l'état du service présent dans la table TABLE_Service
Résultat1 is int
Résultat1 = ServiceStatus(COL_Nom[TABLE_Service])
IF Résultat1 = -1 THEN
	Error(ErrorInfo())
ELSE
	// Appel d'une procédure spécifique WLangage pour transformer le résultat en texte
	Info("Etat du service : " + EtatEnTexte(Résultat1))
END
Syntax
<Result> = ServiceStatus(<Service name> [, <Remote computer>])
<Result>: Integer constant
  • -1 if an error occurred. To get more details on the error, use ErrorInfo,
  • Current status of the service:
    serviceStatusPausedThe service is paused.
    serviceStatusPausingThe service received a command to pause but it has not been paused yet.
    serviceStatusRestartingThe service received a command to restart but it has not been restarted yet.
    serviceStatusStartedThe service is currently operating.
    serviceStatusStartingThe service received a command to start but it has not been started yet.
    serviceStatusStoppedThe service is stopped.
    serviceStatusStoppingThe service received a command to stop but it has not been stopped yet.
<Service name>: Character string
Name of service to check.
<Remote computer>: Optional character string
IP address of the remote computer in xxx.xxx.xxx.xxx format (returned by NetIPAddress) or name of the remote computer (returned by NetMachineName). This parameter is used to control a service on another computer. To use this option, the user must be administrator of remote computer.
If this parameter is not specified or is an empty string (""), the service is handled locally.
Component: wd300std.dll
Minimum version required
  • Version 12
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help