Hi,
I'm trying to do asynchronous consumption of WMI events using System.Manageme nt.
Basically I want to monitor the connection status of Win32_NetworkAd apter. (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(" __InstanceModif icationEvent", "TargetInst ance ISA 'Win32_NetworkA dapter'")
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.Manageme nt?
Thanks for any help you may have
--------------------------------
From: Justin M
-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)
<Id>JLYTmMk12U2 xwCkNkXpoTw==</Id>