PChar(SvrName)
2024-06-25以下为Delphi获取Windows服务、启动和停止服务的代码,使用方法如下: if SERVICE_RUNNING = ServiceGetStatus('', '服务名') then StopServices('服务名', true); StartServices('服务名', false); ---------------------------------------------------------------------------------------------------