Here is my program, a very basic one:
ManagementBaseObject _mBaseObj; ManagementClass _mClass; ManagementEventWatcher _mEventWatcher; EventQuery _eQuery;_mClass =
new ManagementClass("Win32_Process");_eQuery =
new EventQuery("SELECT * FROM __InstanceCreationEvent WHERE ISA \"Win32_Process\"");_mEventWatcher =
new ManagementEventWatcher(_eQuery);_mEventWatcher.EventArrived +=
new EventArrivedEventHandler(_mEventWatcher_EventArrived);_mEventWatcher.Start();
This program pops-up a "ManagementException was unhandled" - Unparsable Query.
I have no clue why this happens, so I would thank anyone who might help me resolving this issue.
thx guyz.
DavidPosted Jan 8, 2009, 9:19 AM
I happened across your post while working on a project to detect my Symbol Handheld Scanner(s) and thought that this might help you. It was originally vb2005 that I used a conversion tool on....
{
WqlEventQuery Query3 = new WqlEventQuery("SELECT * FROM __InstanceOperationEvent WITHIN 1 " + "WHERE TargetInstance ISA 'Win32_Process'");
}
Hope this helps!
D