我正在开发一个C++
使用VS2010
. 在我的代码中,我有两个WQL
查询如下:
hres = pSvc->ExecNotificationQueryAsync(
_bstr_t("WQL"),
_bstr_t("SELECT * "
"FROM __InstanceDeletionEvent WITHIN 1 "
"WHERE TargetInstance ISA 'Win32_Process' "),
WBEM_FLAG_SEND_STATUS,
NULL,
pStubSink);
hres1 = pSvc->ExecNotificationQueryAsync(
_bstr_t("WQL"),
_bstr_t("SELECT * "
"FROM __InstanceCreationEvent WITHIN 1 "
"WHERE TargetInstance ISA 'Win32_Process'"),
WBEM_FLAG_SEND_STATUS,
NULL,
pStubSink);
IWbemObjectSink::Indicate
在创建或删除进程时,我将其名称从该方法打印到控制台中。当打印进程的名称时,我需要知道它是创建还是删除。我怎么会知道这个?有什么方法可以知道哪个异步方法调用了Indicate
方法?
谢谢