Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to set WBEM_ENABLE and WBEM_REMOTE_ENABLE with C++

63 views
Skip to first unread message

Bernd Wessels

unread,
Nov 15, 2009, 11:26:10 PM11/15/09
to
Hello,

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/

ramkumar.g...@gmail.com

unread,
May 7, 2013, 7:10:09 AM5/7/13
to
Hi,

Were you able to resolve this issue? I am trying the same in a C++ app where ExecQueryAsync works for a local host but fails with ACCESS_DENIED for a remote host. Can you please throw light on this?

Thanks,
Ram
0 new messages