Folge dem Video um zu sehen, wie unsere Website als Web-App auf dem Startbildschirm installiert werden kann.
Anmerkung: Diese Funktion ist in einigen Browsern möglicherweise nicht verfügbar.
Public Declare Function GetWindowThreadProcessId Lib "user32" (ByVal hWnd As Long, _
lpdwProcessId As Long) As Long
Public Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, _
ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
Public Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long
Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal Classname As String, _
ByVal WindowName As String) As Long
Public Declare Function ReadProcessMemory Lib "kernel32" (ByVal hProcess As Long, _
ByVal lpBaseAddress As Any, ByRef lpBuffer As Any, ByVal nSize As Long, _
lpNumberOfBytesWritten As Long) As Long
Public Const PROCESS_ALL_ACCESS = &H1F0FFF
Public Function readmemory(window, addy As Long, buffer As Byte)
Dim hWnd As Long, pid As Long, phandle As Long
'per findwindow das fenster anhand des fensternamens suchen
hWnd = FindWindow(vbNullString, window)
'processid von diesem fenster holen
GetWindowThreadProcessId hWnd, pid
'process öffnen
phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
'wert auslesen
ReadProcessMemory phandle, addy, buffer, 1, 0&
'process schliessen
CloseHandle hProcess
End Function