PDA

View Full Version : How to check the current status of a service



Ankitha Varsha
21st October 2008, 13:19
Hi,

How can I check the status of the particular service using Qt?

Basically, I want to find out whether some service say "My Service" is running currently in the system or not. If yes, I need to enable some options in my GUI.

Note that I can not make use of MFC routines as I am porting the code from MFC to Qt and the project is cross-platform.

Any information would be helpful.

/Ankitha Varsha

aamer4yu
21st October 2008, 13:55
When you are talking about system level things, your code does become system dependent.
It is service in Windows and daemons in Linux. You will need #ifdef to code for each platform. How do you think Qt does it ? You can dig into the Qt source code and see yourself. You get a better idea.