-2
我想通过使用WMI来获取正在运行的服务的进程。但我很困惑如何使用WMI。如何在C++中设置WMI?
我觉得用这种方法将工作 http://msdn.microsoft.com/en-us/library/system.serviceprocess.servicecontroller.servicename%28v=vs.71%29
但IA不知道如何设置WMI才能使用此
我知道我需要做的这一点,但我不知道哪里去了从那里开始
HRESULT hres(CoInitializeEx(NULL, COINIT_MULTITHREADED));
// Set general COM security levels
hres = CoInitializeSecurity(
NULL,
-1, // COM authentication
NULL, // Authentication services
NULL, // Reserved
RPC_C_AUTHN_LEVEL_DEFAULT, // Default authentication
RPC_C_IMP_LEVEL_IMPERSONATE, // Default Impersonation
NULL, // Authentication Info
EOAC_NONE, // Additional capabiliteis
NULL // Reserved
);
我们正在使用的服务应用程序的服务名称 – Bullsfan127 2012-07-18 13:11:15
RTFM:http://msdn.microsoft.com/en-us/library/windows/desktop/aa394558%28v=vs.85%29.aspx – 2012-07-18 13:48:10