Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.
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;
Join the community of 500,000 technology professionals and ask your questions.