GSerg писал(а):Точно так же?
Private WithEvents objSink As SWbemSink
Private Sub Form_Load()
strComputer = "."
Set objWMIService = GetObject( _
"winmgmts:{impersonationLevel = Impersonate}!\\" _
& strComputer & "\ROOT\CIMV2")
Set objSink = New SWbemSink
objWMIService.ExecNotificationQueryAsync objSink, _
"SELECT * FROM Win32_ProcessStartTrace WHERE ProcessName LIKE '%.scr'"
End Sub
Private Sub objSink_OnObjectReady(ByVal objWbemObject As WbemScripting.ISWbemObject, ByVal objWbemAsyncContext As WbemScripting.ISWbemNamedValueSet)
MsgBox "Alarm, Alarm!"
End Sub
Сейчас этот форум просматривают: Yandex-бот и гости: 73