编写的系统服务通用框架

易语言 2020-06-22 17:53:48

易语言编写系统服务通用框架开源。
hStatus = RegisterServiceCtrlHandler (ServerName, 到整数 (&Handler))
ServiceStatus.dwServiceType = #SERVICE_WIN32_OWN_PROCESS
ServiceStatus.dwCurrentState = #SERVICE_START_PENDING
ServiceStatus.dwControlsAccepted = 位或 (#SERVICE_ACCEPT_STOP, #SERVICE_ACCEPT_SHUTDOWN)
ServiceStatus.dwWin32ExitCode = 0
ServiceStatus.dwServiceSpecificExitCode = 0
ServiceStatus.dwCheckPoint = 0
ServiceStatus.dwWaitHint = 0
ServiceStatus.dwCurrentState = #SERVICE_RUNNING
SetServiceStatus (hStatus, ServiceStatus)