Hi,
I'm trying to do asynchronous consumption of WMI events using System.Management.
Basically I want to monitor the connection status of Win32_NetworkAdapter. (i.e recieve events when it connects, disconnects)
I tried implementing and changing this code from msdn:
http://msdn.microsoft.com/library/de...mentevents.asp
I changed it to use:
Dim query As New WqlEventQuery("__InstanceModificationEvent", "TargetInstance ISA 'Win32_NetworkAdapter'")
The problem is that it demands I use a WITHIN in the WQL (otherwise I get a "HRESULT: 0x80042002" error).
I don't want to use WITHIN because this causes the system to poll and use quite a bit of CPU.
How come the example on MSDN doesn't need WITHIN?
What are my options here? Should I even use System.Management?
Thanks for any help you may have
--------------------------------
From: Justin M
-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)
<Id>JLYTmMk12U2xwCkNkXpoTw==</Id>