I am trying to call the following function:
hResult = m_pWbemServices->ExecNotificationQueryAsync(
_bstr_t("WQL"),
_bstr_t("SELECT * FROM __InstanceCreationEvent WITHIN 1
WHERE TargetInstance ISA 'Win32_NTLogEvent'"),
WBEM_FLAG_SEND_STATUS,
NULL,
m_pStubWbemObjectSink);
BUT in some cases it returns access denied.
The reason is that I have to set WBEM_ENABLE and WBEM_REMOTE_ENABLE
before.
BUT I dont know how to do it from C++ ???
Please please help, it drives me crazy.
Thanks
Bernd
For details see here:
http://social.msdn.microsoft.com/Forums/en-US/windowsgeneraldevelopmentissues/thread/c6482c2a-88ca-467a-af74-b8b3e412ad0d/