If I compile it with D XE2 and run it on a Win7-machine, h_svc has a correct value and I can work with it. If I compile it in D XE5 and run it on a Win8-machine (I changed my developpement-machine), h_svc is alway zero. If I only have QUERY_STATUS as Parameter it is ok. So I guess that this is a policy-problem. (btw: the service is SQL Server) How can I solve this? Thanks for every hint, Peter
h_manager := OpenSCManager(PChar(Machine), nil, SC_MANAGER_CONNECT); if h_manager > 0 then begin h_svc := OpenService(h_manager, PChar(ServiceName), SERVICE_START or SERVICE_QUERY_STATUS or SERVICE_ALL_ACCESS); if h_svc > 0 then begin end; end;
|How to use Hibernate and delphi ? Does anyone know any tutorial?||2||143|
|How to disable mouse scroll in a combo box field within a Delphi cxGrid||4||107|
|How to fill array with TArray.Create?||14||77|
|When i run adoquery my application freezes||26||150|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
10 Experts available now in Live!