We value your feedback.
Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
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;
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.