- #1
T
Tuvok
Aktives Mitglied
Themenersteller
- Dabei seit
- 27.04.2001
- Beiträge
- 38
- Reaktionspunkte
- 0
Zonealarm lässt sich schneller abschalten als ihm lieb ist:
Option Explicit
Private Declare Function CloseHandle Lib kernel32 (ByVal hObject As Long)
As Long
Private Declare Function TerminateProcess Lib kernel32 (ByVal hProcess As
Long, ByVal uExitCode As Long) As Long
Private Declare Function OpenProcess Lib kernel32 (ByVal dwDesiredAccess
As Long, _
ByVal bInheritHandle As Long, ByVal dwProcessId As Long)
As Long
Const PROCESS_TERMINATE = &H1
Private Declare Function GetWindowThreadProcessId Lib user32 (ByVal hWnd
As Long, lpdwProcessId As Long) As Long
Private Declare Function FindWindow Lib user32 Alias FindWindowA ( _
ByVal lpClassName As String, ByVal lpWindowName As
String) As Long
Private Sub Close_ZoneAlarm()
Dim xhwnd As Long
Dim pwid As Long
xhwnd = FindWindow(vbNullString, ZoneAlarm)
GetWindowThreadProcessId xhwnd, pwid
Dim Task As Long, result As Long
Task = OpenProcess(PROCESS_TERMINATE, 0&, pwid)
TerminateProcess Task, 1&
CloseHandle Task
End Sub
Andrea
--
wo sind die Buzzwords??
Option Explicit
Private Declare Function CloseHandle Lib kernel32 (ByVal hObject As Long)
As Long
Private Declare Function TerminateProcess Lib kernel32 (ByVal hProcess As
Long, ByVal uExitCode As Long) As Long
Private Declare Function OpenProcess Lib kernel32 (ByVal dwDesiredAccess
As Long, _
ByVal bInheritHandle As Long, ByVal dwProcessId As Long)
As Long
Const PROCESS_TERMINATE = &H1
Private Declare Function GetWindowThreadProcessId Lib user32 (ByVal hWnd
As Long, lpdwProcessId As Long) As Long
Private Declare Function FindWindow Lib user32 Alias FindWindowA ( _
ByVal lpClassName As String, ByVal lpWindowName As
String) As Long
Private Sub Close_ZoneAlarm()
Dim xhwnd As Long
Dim pwid As Long
xhwnd = FindWindow(vbNullString, ZoneAlarm)
GetWindowThreadProcessId xhwnd, pwid
Dim Task As Long, result As Long
Task = OpenProcess(PROCESS_TERMINATE, 0&, pwid)
TerminateProcess Task, 1&
CloseHandle Task
End Sub
Andrea
--
wo sind die Buzzwords??