3
我如何获得C++中的Windows服务的状态?Windows服务状态C++?
这是一个C#示例:
ServiceController sc = new ServiceController("Spooler", "Server1");
if (sc.Status == ServiceControllerStatus.Running)
{
MessageBox.Show("The service is running.");
}
但我怎么做C++中的相同呢?
但我必须包括什么? – Rhino 2011-03-26 12:29:04
@Rhino每个Win32函数的MSDN文档都会告诉你,对于每个函数,你需要使用哪些包含文件。请阅读“需求”一节中的页面。 – 2011-03-26 12:29:51