Click here to Skip to main content
15,881,709 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
I'm using VS2005 and am try to create a program which shows the current running services and found that particular service is running or not.

Can anybody tell me what I have to do for achieving this.

I am working on vc++.

Thanks,
Vaibhav Jaiswal
Posted

See the EnumServicesStatusEx[^] API function.
 
Share this answer
 
That is very easy, you just need to use 2 WinAPI: OpenSCManager and EnumServicesStatus. First one is used to obtain service control manager handle, and the second one to enumerate services based on given status and type.

Regards,
Maxim.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900