如何判断控制面板-管理工具-服务中有没有某个服务?delphi 如何判断控制面板-管理工具-服务中有没有某个服务?delphi 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 用EnumServicesStatus找,貌似winsvc单元的有bug,要用jedi封装的Jwawinsvc单元里面的 uses WinSvc;function ES(const AServiceName: string): Boolean;var hSM, schService: SC_HANDLE;begin Result := False; hSM := OpenSCManager(nil, nil, SC_MANAGER_ALL_ACCESS); try if (hSM = 0) then Exit; schService := OpenService(hSM, PChar(AServiceName), SERVICE_ALL_ACCESS); try Result := schService <> 0; finally CloseServiceHandle(schService); end; finally CloseServiceHandle(hSM); end;end; AssignFile( MyFile, 'com1') 实现小票机串并口直接打印,怎样控制字体大小? 如何取得登录域的用户名? 文件里的字符串替换 高手!这条SQL怎么写? 能不能从一串字符,如‘105毫米’中只取出数字‘105’? MDI窗口如何设定大小,标题,如何限制MDI移出主窗口区域! 请问:delphi中他tadodataset怎样进行批处理insert数据操作? SOS ADO数据库中的varBinary字段的存取 TStream Delhi如此可怜 高分征解:关于IE控件使用的几个问题 dll 中定时器的问题 求 Raize4.3.2 控件包自带说明文档
uses
WinSvc;function ES(const AServiceName: string): Boolean;
var
hSM, schService: SC_HANDLE;
begin
Result := False;
hSM := OpenSCManager(nil, nil, SC_MANAGER_ALL_ACCESS);
try
if (hSM = 0) then
Exit;
schService := OpenService(hSM, PChar(AServiceName), SERVICE_ALL_ACCESS);
try
Result := schService <> 0;
finally
CloseServiceHandle(schService);
end;
finally
CloseServiceHandle(hSM);
end;
end;