-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