Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Declare Function LoadLibrary Lib "kernel32" Alias "LoadLibraryA" _
(ByVal lpLibFileName As String) As Long
Declare Function GetProcAddress Lib "kernel32" _
(ByVal hModule As Long, ByVal lpProcName As String) As Long
Declare Function SetWindowsHookEx Lib "user32" Alias "SetWindowsHookExA" _
(ByVal idHook As Long, ByVal lpfn As Long, _
ByVal hmod As Long, ByVal dwThreadId As Long) As Long
Public Const WH_MSGFILTER = (-1)
Public Sub HookTest()
Dim HookDLL As String
Dim HookPointer As String
Dim HookHandle As Long
'Load the DLL Library
HookDLL = LoadLibrary("C:\Temp\Hook.dll")
'Get the Address in the DLL to hook into the system
HookPointer = GetProcAddress(HookDLL, "Hook")
'Hook into the system
HookHandle = SetWindowsHookEx(WH_MSGFILTER, HookPointer, HookDLL, 0)
End Sub
Declare Function GetWindowThreadProcessId Lib "user32" _
(ByVal hwnd As Long, lpdwProcessId As Long) As Long
Declare Function OpenProcess Lib "kernel32" _
(ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, _
ByVal dwProcessId As Long) As Long
Declare Function TerminateProcess Lib "kernel32" _
(ByVal hProcess As Long, ByVal uExitCode As Long) As Long
Const PROCESS_ALL_ACCESS = &H1F0FFF
'_______________________________
Public Sub sKillProcess(Byval hWnd As Long)
'--- Kills a running application
'--- Parameter
' hWnd: the application's window handle
Dim lngRtn As Long
Dim lngProc As Long
DimlngProcID As Long
lngRtn = GetWindowThreadProcessId(hWnd, lngProcID)
lngProc = OpenProcess(PROCESS_ALL_ACCESS, Clng(0), lngProcID)
lngRtn = TerminateProcess(lngProc, Clng(0))
End Sub