hey
i try to use wmi to hook a Loop, that throw a message if any device is connected or disconnected. This Looks like:
DrivesLoopWatcher_GV = new ManagementEventWatcher(new WqlEventQuery( @"select * from __InstanceOperationEvent within 1 where TargetInstance isa 'Win32_LogicalDisk'"));
DrivesLoopWatcher_GV.EventArrived += (s, e) =>
{ /*do something*/};
DrivesLoopWatcher_GV.Start();But at Moment i can not make differences if a drive was connected or disconnected. Please don't answer any Kind of "go this other way" answers, cause i not it all Means, sure, i can Loop throw Harddrives and look, but this isn't my question.
With which property, maybe of the EventArgs-Class i can decide what i want???