Maus DPI abfragen

  • Hallo Leute

    Ich bin neu hier und ich hoffe mir kann einer Helfen.

    Ich bin gerade dabei eine Applet für die G510s zu schreiben und zwar soll es foldends tun.

    Die DPI Einstellung der Maus anzeigen wenn sie geändert wird.

    der Hintergrund ist auf dem Desktop wird die DPI angezeigt wenn sie geäöndert wird an der Maus, nur wenn man in einem Spiel ist dann sieht man es nicht also weiß man nicht mit welcher DPI man gerade spielt.

    Ist es möglich die aktuelle DPI Einstellung irgendwo raus zulesen oder ist es möglich nicht nur die Linke-, Recht- und Mittleremaustaste abzufragen sondern auch noch alle anderen der Maus (wo ja dan auch die beiden taste für DPI+ und DPI- dabei wären)?

    Wäre toll wenn einer Helfen könnte.

    2 Mal editiert, zuletzt von Stalker (8. Oktober 2014 um 16:31)

  • Ich vermute das ist eine Sache in der Maus-Hardware. Wenn du die DPI-Anzeige auf dem Desktop siehst, dann wird diese DPI Zahl vermutlich auch über einen Treiber ausgelesen.

    Die Mausgeschwindigkeit der Windows-Einstellung wäre leicht auszulesen und zu ändern, da dies über Windows geschieht. In deinem Fall wird die DPI-Zahl aber über die Maus geregelt, da ist es schwieriger.


    Einfachste Möglichkeit meinerseits, wäre es, die auf dem Desktop befindliche DPI-Zahl auszulesen. Da es sich vermutlich um kein auslesbares Steuerelement handelt, schlage ich "_WinAPI_ReadProcessMemory" vor.

    Ich schlage vor mit einem Memory-Searcher Tool (wie z.B. http://memoryhacking.com/download.php ) nach der Speicheradresse zu suchen.

    Dann kannst du mit Hilfe des Handle's und der Speicheradresse, den Wert auslesen und diesen hoffentlich über GDI+ in der aktuellen Anwendung auf dem Bildschirm zeichnen.


    Das hört sich jetzt erst mal sehr schwer an.
    So schwer ist es nicht, wenn man sich damit schonmal beschäftigt hat, aber als Anfänger wirst du vermutlich Probleme bekommen.
    Ich würde dir gerne einen Beispiel-Code schreiben, aber ich habe leider keinen Zugriff auf deine Maus sowie auf dein DPI-Desktop-Widget, um mir einen Eindruck über die Lage zu verschaffen.

    Du könntest Testweise erstmal versuchen ob du mit dem "Au3Info" Informationen bekommst, wenn du dieses auf das DPI-Anzeige-Widget ziehst. Falls nein, weißt du zumindest schon mal, dass du meinen genannten weg gehen musst.

    2 Mal editiert, zuletzt von KloMeister (1. Oktober 2014 um 21:19)

  • Mit der Au3Info habe ich es auch schon versucht das aber der gibt nichts wieder

    Das mit der Mausgeschwindigkeit in der Windows-Einstellung habe ich schon oft gelesen aber das ist ja nicht wirklich die DPI Zahl der Maus.
    Das die DPI über die Hardware und Maus intern passiert habe ich mir schon gedacht und dadurch fast unmöglich ist dort dran zu kommen.

    Aber der Tipp mit dem Memory-Searcher Tool ist gut und werde ich mal ausprobieren, Danke schon mal

    Die Maus ist eine Razer mit dem Tool Razer Synapse 2.0


    So habe mir jetzt das von der gesagt Tool runtergeladen, aber damit komme ich nicht klar, wie funktioniert es? wie kann ich da nach etwas suchen?

    Okay habe jetzt mit Cheatengine (ist vielleicht komisch macht aber das selbe) die speicheradresse gefunden.

    Eine Erklärung wie ich jetzt _WinAPI_ReadProcessMemory benutze wäre toll da ich bei der Deutsche online-hilfe hier im Forum nicht klar komme.

    4 Mal editiert, zuletzt von Stalker (1. Oktober 2014 um 21:53)

  • Hallo nochmal,

    Ich habe dir mal ein Beispiel zusammen gesucht und gebastelt, dass aus Winamp die aktuelle "Trackzeit" über ReadProcessMemory ausließt (Funktioniert vermutlich nur mit Winamp Version 5.666 Build 3516):

    [autoit][/autoit][autoit][/autoit][autoit]

    #include <WinAPI.au3>
    #include <MsgBoxConstants.au3>
    #include <Constants.au3>

    [/autoit][autoit][/autoit][autoit]

    Global $Process="Winamp.exe";Ersetze mit deinem Prozess
    Global $Pointer = 0x004B5E54; Ersetze mit deiner Adresse
    $handle=_WinAPI_OpenProcess(BitOR($PROCESS_VM_OPERATION,$PROCESS_VM_READ),False,ProcessExists($Process))
    $s=DllStructCreate("int")
    Local $read
    _WinAPI_ReadProcessMemory($handle,$Pointer,DllStructGetPtr($s),DllStructGetSize($s),$read)
    MsgBox(0,"Gelesener Wert",DllStructGetData($s,1))

    [/autoit]

    Wenn du wirklich die richtige Adresse hast, den Prozessnamen kennst und deine ermittelte Speicher-Adresse eine feste Adresse ist und somit keinen zusätzlichen Pointer benötigt, dann sollte alles laufen, wenn du die Daten entsprechend ersetzt.

    Bei weiteren Problemen kann ich notfalls auch mal mit Teamviewer drüber schauen.

    2 Mal editiert, zuletzt von KloMeister (2. Oktober 2014 um 10:20)

  • Kann ich gerne mal machen:

    Ich vermute mal im Internet gibt es da einige Tutorials, aber ich erkläre trotzdem mal, wie ich vorgegangen bin:

    1--> Programm starten


    2.-> Gewünschten Prozess mit dem Programm öffnen dazu -> "File" -> "Open Process" (Zu Welchem Process das Widget gehört müsstest du noch vorher herausfinden)

    3.->
    [Blockierte Grafik: http://www65.zippyshare.com/thumb/72962003/file.html]

    Wenn du den exakten Wert kennst, versuch es mit der DPI Zahl die in dem Widget steht, tippe ihn dort ein und drücke "OK"
    Nun hast du alle Adressen im Speicher dieses Prozesses gefunden, welche Momentan den Wert der Zahl haben die du eingegeben hast. Da der Prozesspeicher groß ist, gibt es mehrere. Nun musst du filtern.


    4.-> Filterung des Wertes:

    [Blockierte Grafik: http://www65.zippyshare.com/thumb/1974947/file.html]

    Du veränderst nun den DPI Wert so, dass er anders ist als er davor war und filterst den Wert wie im Bild (4.) gezeigt.
    Das machst du solange bis im Idealfall nurnoch 1 Wert überbleibt, der den entsprechenden Wert deiner DPI Zahl beinhaltet.

    Grüne Speicheradresse, sind diejenigen die "Fest" im Speicher zugeordnet sind, Schwarze Speicherwerte benötigen noch einen zusätzlichen Pointer, da diese Speicheradressen bei jedem Programmstart neu zugeordnet werden.
    Hoffen wir das du am Ende einen grünen Wert hast.


    Eventuell können wir das auch heute Abend oder an einem anderen Tag über Teamviewer machen, das scheint mir zeitsparender und effektiver zu sein.

  • so ich habe insgesamt 6 Adressen, ich muss aber nach dem Pointer und Offset suchen das die Adressen sich jedesmal ändern wenn die Software neu gestartet wird.

    wie sucht man nach pointern?

  • Du machst es mir hier nicht leicht :D

    Hier erstmal, damit du eigentlich weißt was du so macht:
    http://de.wikipedia.org/wiki/Zeiger_(Informatik))

    Es gibt quasi eine Speicheradresse, die den Wert deiner gesuchten immer neu zugeordneten Adresse trägt (Bzw. einen Wert der eine bestimmten Anzahl darüber oder darunter liegt). Manchmal muss man auch noch ein paar Bytes dazu addieren / subtrahieren.

    Wie findet man jetzt den Pointer?
    Ganz einfach, indem man seine gefundene HEX-Adresse (Die ja jedes mal anders ist) in Dezimal umwandelt und sucht ob es diesen Wert in einer anderen Adresse gespeichert gibt bzw. ob es einen ähnlichen Wert der in der nähe dieser Adresse liegt gibt, der aber immer die gleiche Logik besitzt.

  • okey ich habe mir schon mal ein paar Sachen im Internet angeschaut wie man Pointer/basepointer und Offsets findet komme da aber nicht weiter


    wir können das auch über Teamviewer machen

    Einmal editiert, zuletzt von Stalker (2. Oktober 2014 um 20:15)

  • Ich habe ihm nun über Teamviewer geholfen.

    Wir haben herausgefunden, dass es sich um eine Speicheradresse handelt die "variabel" ist. Wir haben auch keinen passenden Pointer gefunden.

    Allerdings haben wir herausgefunden, dass die Adresse wahrscheinlich nur um "256" Zustände variabel ist und haben daher eine "Prüffunktion" eingebaut.

    Wir haben die Speicheradresse gesplittet, an der variablen Stelle eine Schleife eingebaut die die 256 Zustände durchzählt, dort fügen wir den momentanen Schleifen-Wert wieder als HEX ein.
    In einer zweiten Schleife die in der ersten Schleife eingebaut ist, fragen wir ab, ob die Speicheradresse einen Wert hat, der für DPI in Frage kommen würde. Eine Schleife von "100 bis 8200 step 100". Da der DPI Wert von 100 bis 8200 an der Maus einstellbar ist.
    Wurde so ein Wert in der Speicheradresse gefunden, dann geht das Programm davon aus, dass es sich um die DPI-Zahl der Maus handelt und gibt den aktuellen Wert wieder.


    Als nächstes sind wir nun bei dem Punkt, wo wir den ausgelesenen Wert auf dem Bildschirm "zeichnen" müssen. Darum habe ich mich noch nicht gekümmert. Wie ich bereits sagte, könnte man versuchen mit GDI+ auf dem gerade aktiven Bildschirm zu zeichnen.

    5 Mal editiert, zuletzt von KloMeister (2. Oktober 2014 um 21:47)

  • Naja das Problem ist noch nicht gelöst die speicheradresse ändert sich nicht nur um 2 stellen sondern um, ich würde schon sagen um, alle stellen.

    Also bleibt mir wohl nichts anderes übrig als nach dem basepointer zu suchen oder ich schaffe es die dpi Einstellung aus der dll des Tools zu lesen


    So ich habe mit hilfe von Cheat Engine folgendes gefunden

    "RazerConfigNative.dll"+0049FA60 -> 0D418118

    0D418118 + 190 -> 0D21D080

    0D21D080 +0 -> 0BBC8360

    0BBC8360 + B0 -> 0BB142E8

    0BB142E8 + 470 -> 0BB15FD8

    0BB15FD8 + 1FC = 0BB161D4

    Diesen Pointer (Adressen reinfolge/ Rechnung) habe ich mir in Cheat Engine abgespeichert und egal wie oft ich den PC neu Starte oder auch das Maus Tool ich kann über diese Adresse mit den rechungen immer meine DPI auslesen

    Nur wie bekomme ich das jetzt in deine Programm vom Post rein?

    Einmal editiert, zuletzt von Stalker (3. Oktober 2014 um 10:57)

  • lad dir die pointer.au3
    schau dir dazu tutorials an wie man mit pointern umgeht

    rechnen musst du das genauso wie da nur halt die base address vom modul (der dll) rausfinden. die pointer.au3 funktionen werden aber mit einem offset array arbeiten welche dann auch addiert werden

  • Spoiler anzeigen


    #include <Pointer.au3>

    $pid = ProcessExists("RzSynapse.exe")
    if $pid = 0 then Exit

    setPrivilege("SeDebugPrivilege",1)

    $ah_Handle = _MemoryOpen($pid)

    $iv_Address = 0x69c40000 ; Adresse hinter der dll

    DIM $av_offset[7]
    $av_offset[0] = 0x0
    $av_offset[1] = 0x0049FA60
    $av_offset[2] = 0x190
    $av_offset[3] = 0x0
    $av_offset[4] = 0xB0
    $av_offset[5] = 0x470
    $av_offset[6] = 0x1FC

    $result = _MemoryPointerRead ($iv_Address, $ah_Handle, $av_Offset)

    $basep = $result[0]


    MsgBox(0," ", $basep & @CRLF & $result[1])

    habe es so versucht hat auch beim erstemal super geklappt nur nach dem ich den rechner neu gestartet habe zeigt mir das Programm nun eine ganz andere Adresse an die er errechnet
    aber die gespeicherte pointer Offset Einstellung in Cheat Engine geht noch

  • so mit langem suchen im Internet nun endlich geschafft

    die passende UDP

    Spoiler anzeigen
    [autoit]


    #include-once
    #region _Memory
    ;=================================================================================================
    ; AutoIt Version: 3.1.127 (beta)
    ; Language: English
    ; Platform: All Windows
    ; Author: Nomad
    ; Requirements: These functions will only work with beta.
    ;=================================================================================================
    ; Credits: wOuter - These functions are based on his original _Mem() functions. But they are
    ; easier to comprehend and more reliable. These functions are in no way a direct copy
    ; of his functions. His functions only provided a foundation from which these evolved.
    ;=================================================================================================
    ;
    ; Functions:
    ;
    ;=================================================================================================
    ; Function: _MemoryOpen($iv_Pid(, $iv_DesiredAccess(, $iv_InheritHandle)))
    ; Description: Opens a process and enables all possible access rights to the process. The
    ; Process ID of the process is used to specify which process to open. You must
    ; call this function before calling _MemoryClose(), _MemoryRead(), or _MemoryWrite().
    ; Parameter(s): $iv_Pid - The Process ID of the program you want to open.
    ; $iv_DesiredAccess - (optional) Set to 0x1F0FFF by default, which enables all
    ; possible access rights to the process specified by the
    ; Process ID.
    ; $if_InheritHandle - (optional) If this value is TRUE, all processes created by
    ; this process will inherit the access handle. Set to TRUE
    ; (1) by default. Set to 0 if you want it to be FALSE.
    ; Requirement(s): A valid process ID.
    ; Return Value(s): On Success - Returns an array containing the Dll handle and an open handle to
    ; the specified process.
    ; On Failure - Returns 0
    ; @Error - 0 = No error.
    ; 1 = Invalid $iv_Pid.
    ; 2 = Failed to open Kernel32.dll.
    ; 3 = Failed to open the specified process.
    ; Author(s): Nomad
    ; Note(s):
    ;=================================================================================================
    Func _MemoryOpen($iv_Pid, $iv_DesiredAccess = 0x1F0FFF, $if_InheritHandle = 1)

    [/autoit] [autoit][/autoit] [autoit]

    If Not ProcessExists($iv_Pid) Then
    SetError(1)
    Return 0
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Local $ah_Handle[2] = [DllOpen('kernel32.dll')]

    [/autoit] [autoit][/autoit] [autoit]

    If @Error Then
    SetError(2)
    Return 0
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Local $av_OpenProcess = DllCall($ah_Handle[0], 'int', 'OpenProcess', 'int', $iv_DesiredAccess, 'int', $if_InheritHandle, 'int', $iv_Pid)

    [/autoit] [autoit][/autoit] [autoit]

    If @Error Then
    DllClose($ah_Handle[0])
    SetError(3)
    Return 0
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    $ah_Handle[1] = $av_OpenProcess[0]

    [/autoit] [autoit][/autoit] [autoit]

    Return $ah_Handle

    [/autoit] [autoit][/autoit] [autoit]

    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    ;=================================================================================================
    ; Function: _MemoryRead($iv_Address, $ah_Handle(, $sv_Type))
    ; Description: Reads the value located in the memory address specified.
    ; Parameter(s): $iv_Address - The memory address you want to read from. It must be in hex
    ; format (0x00000000).
    ; $ah_Handle - An array containing the Dll handle and the handle of the open
    ; process as returned by _MemoryOpen().
    ; $sv_Type - (optional) The "Type" of value you intend to read. This is set to
    ; 'dword'(32bit(4byte) signed integer) by default. See the help file
    ; for DllStructCreate for all types.
    ; An example: If you want to read a word that is 15 characters in
    ; length, you would use 'char[16]'.
    ; Requirement(s): The $ah_Handle returned from _MemoryOpen.
    ; Return Value(s): On Success - Returns the value located at the specified address.
    ; On Failure - Returns 0
    ; @Error - 0 = No error.
    ; 1 = Invalid $ah_Handle.
    ; 2 = $sv_Type was not a string.
    ; 3 = $sv_Type is an unknown data type.
    ; 4 = Failed to allocate the memory needed for the DllStructure.
    ; 5 = Error allocating memory for $sv_Type.
    ; 6 = Failed to read from the specified process.
    ; Author(s): Nomad
    ; Note(s): Values returned are in Decimal format, unless specified as a 'char' type, then
    ; they are returned in ASCII format. Also note that size ('char[size]') for all
    ; 'char' types should be 1 greater than the actual size.
    ;=================================================================================================
    Func _MemoryRead($iv_Address, $ah_Handle, $sv_Type = 'dword')

    [/autoit] [autoit][/autoit] [autoit]

    If Not IsArray($ah_Handle) Then
    SetError(1)
    Return 0
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Local $v_Buffer = DllStructCreate($sv_Type)

    [/autoit] [autoit][/autoit] [autoit]

    If @Error Then
    SetError(@Error + 1)
    Return 0
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    DllCall($ah_Handle[0], 'int', 'ReadProcessMemory', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer), 'int', '')

    [/autoit] [autoit][/autoit] [autoit]

    If Not @Error Then
    Local $v_Value = DllStructGetData($v_Buffer, 1)
    Return $v_Value
    Else
    SetError(6)
    Return 0
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    ;=================================================================================================
    ; Function: _MemoryWrite($iv_Address, $ah_Handle, $v_Data(, $sv_Type))
    ; Description: Writes data to the specified memory address.
    ; Parameter(s): $iv_Address - The memory address you want to write to. It must be in hex
    ; format (0x00000000).
    ; $ah_Handle - An array containing the Dll handle and the handle of the open
    ; process as returned by _MemoryOpen().
    ; $v_Data - The data to be written.
    ; $sv_Type - (optional) The "Type" of value you intend to write. This is set to
    ; 'dword'(32bit(4byte) signed integer) by default. See the help file
    ; for DllStructCreate for all types.
    ; An example: If you want to write a word that is 15 characters in
    ; length, you would use 'char[16]'.
    ; Requirement(s): The $ah_Handle returned from _MemoryOpen.
    ; Return Value(s): On Success - Returns 1
    ; On Failure - Returns 0
    ; @Error - 0 = No error.
    ; 1 = Invalid $ah_Handle.
    ; 2 = $sv_Type was not a string.
    ; 3 = $sv_Type is an unknown data type.
    ; 4 = Failed to allocate the memory needed for the DllStructure.
    ; 5 = Error allocating memory for $sv_Type.
    ; 6 = $v_Data is not in the proper format to be used with the "Type"
    ; selected for $sv_Type, or it is out of range.
    ; 7 = Failed to write to the specified process.
    ; Author(s): Nomad
    ; Note(s): Values sent must be in Decimal format, unless specified as a 'char' type, then
    ; they must be in ASCII format. Also note that size ('char[size]') for all
    ; 'char' types should be 1 greater than the actual size.
    ;=================================================================================================
    Func _MemoryWrite($iv_Address, $ah_Handle, $v_Data, $sv_Type = 'dword')

    [/autoit] [autoit][/autoit] [autoit]

    If Not IsArray($ah_Handle) Then
    SetError(1)
    Return 0
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Local $v_Buffer = DllStructCreate($sv_Type)

    [/autoit] [autoit][/autoit] [autoit]

    If @Error Then
    SetError(@Error + 1)
    Return 0
    Else
    DllStructSetData($v_Buffer, 1, $v_Data)
    If @Error Then
    SetError(6)
    Return 0
    EndIf
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    DllCall($ah_Handle[0], 'int', 'WriteProcessMemory', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer), 'int', '')

    [/autoit] [autoit][/autoit] [autoit]

    If Not @Error Then
    Return 1
    Else
    SetError(7)
    Return 0
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    ;=================================================================================================
    ; Function: _MemoryClose($ah_Handle)
    ; Description: Closes the process handle opened by using _MemoryOpen().
    ; Parameter(s): $ah_Handle - An array containing the Dll handle and the handle of the open
    ; process as returned by _MemoryOpen().
    ; Requirement(s): The $ah_Handle returned from _MemoryOpen.
    ; Return Value(s): On Success - Returns 1
    ; On Failure - Returns 0
    ; @Error - 0 = No error.
    ; 1 = Invalid $ah_Handle.
    ; 2 = Unable to close the process handle.
    ; Author(s): Nomad
    ; Note(s):
    ;=================================================================================================
    Func _MemoryClose($ah_Handle)

    [/autoit] [autoit][/autoit] [autoit]

    If Not IsArray($ah_Handle) Then
    SetError(1)
    Return 0
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    DllCall($ah_Handle[0], 'int', 'CloseHandle', 'int', $ah_Handle[1])
    If Not @Error Then
    DllClose($ah_Handle[0])
    Return 1
    Else
    DllClose($ah_Handle[0])
    SetError(2)
    Return 0
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    ;=================================================================================================
    ; Function: _MemoryPointerRead ($iv_Address, $ah_Handle, $av_Offset(, $sv_Type))
    ; Description: Reads a chain of pointers and returns an array containing the destination
    ; address and the data at the address.
    ; Parameter(s): $iv_Address - The static memory address you want to start at. It must be in
    ; hex format (0x00000000).
    ; $ah_Handle - An array containing the Dll handle and the handle of the open
    ; process as returned by _MemoryOpen().
    ; $av_Offset - An array of offsets for the pointers. Each pointer must have an
    ; offset. If there is no offset for a pointer, enter 0 for that
    ; array dimension. (Offsets must be in decimal format, NOT hex!)
    ; $sv_Type - (optional) The "Type" of data you intend to read at the destination
    ; address. This is set to 'dword'(32bit(4byte) signed integer) by
    ; default. See the help file for DllStructCreate for all types.
    ; Requirement(s): The $ah_Handle returned from _MemoryOpen.
    ; Return Value(s): On Success - Returns an array containing the destination address and the value
    ; located at the address.
    ; On Failure - Returns 0
    ; @Error - 0 = No error.
    ; 1 = $av_Offset is not an array.
    ; 2 = Invalid $ah_Handle.
    ; 3 = $sv_Type is not a string.
    ; 4 = $sv_Type is an unknown data type.
    ; 5 = Failed to allocate the memory needed for the DllStructure.
    ; 6 = Error allocating memory for $sv_Type.
    ; 7 = Failed to read from the specified process.
    ; Author(s): Nomad
    ; Note(s): Values returned are in Decimal format, unless a 'char' type is selected.
    ; Set $av_Offset like this:
    ; $av_Offset[0] = NULL (not used)
    ; $av_Offset[1] = Offset for pointer 1 (all offsets must be in Decimal)
    ; $av_Offset[2] = Offset for pointer 2
    ; etc...
    ; (The number of array dimensions determines the number of pointers)
    ;=================================================================================================
    Func _MemoryPointerRead ($iv_Address, $ah_Handle, $av_Offset, $sv_Type = 'dword')

    [/autoit] [autoit][/autoit] [autoit]

    If IsArray($av_Offset) Then
    If IsArray($ah_Handle) Then
    Local $iv_PointerCount = UBound($av_Offset) - 1
    Else
    SetError(2)
    Return 0
    EndIf
    Else
    SetError(1)
    Return 0
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Local $iv_Data[2], $i
    Local $v_Buffer = DllStructCreate('dword')

    [/autoit] [autoit][/autoit] [autoit]

    For $i = 0 to $iv_PointerCount

    [/autoit] [autoit][/autoit] [autoit]

    If $i = $iv_PointerCount Then
    $v_Buffer = DllStructCreate($sv_Type)
    If @Error Then
    SetError(@Error + 2)
    Return 0
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    $iv_Address = '0x' & hex($iv_Data[1] + $av_Offset[$i])
    DllCall($ah_Handle[0], 'int', 'ReadProcessMemory', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer), 'int', '')
    If @Error Then
    SetError(7)
    Return 0
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    $iv_Data[1] = DllStructGetData($v_Buffer, 1)

    [/autoit] [autoit][/autoit] [autoit]

    ElseIf $i = 0 Then
    DllCall($ah_Handle[0], 'int', 'ReadProcessMemory', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer), 'int', '')
    If @Error Then
    SetError(7)
    Return 0
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    $iv_Data[1] = DllStructGetData($v_Buffer, 1)

    [/autoit] [autoit][/autoit] [autoit]

    Else
    $iv_Address = '0x' & hex($iv_Data[1] + $av_Offset[$i])
    DllCall($ah_Handle[0], 'int', 'ReadProcessMemory', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer), 'int', '')
    If @Error Then
    SetError(7)
    Return 0
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    $iv_Data[1] = DllStructGetData($v_Buffer, 1)

    [/autoit] [autoit][/autoit] [autoit]

    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Next

    [/autoit] [autoit][/autoit] [autoit]

    $iv_Data[0] = $iv_Address

    [/autoit] [autoit][/autoit] [autoit]

    Return $iv_Data

    [/autoit] [autoit][/autoit] [autoit]

    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    ;=================================================================================================
    ; Function: _MemoryPointerWrite ($iv_Address, $ah_Handle, $av_Offset, $v_Data(, $sv_Type))
    ; Description: Reads a chain of pointers and writes the data to the destination address.
    ; Parameter(s): $iv_Address - The static memory address you want to start at. It must be in
    ; hex format (0x00000000).
    ; $ah_Handle - An array containing the Dll handle and the handle of the open
    ; process as returned by _MemoryOpen().
    ; $av_Offset - An array of offsets for the pointers. Each pointer must have an
    ; offset. If there is no offset for a pointer, enter 0 for that
    ; array dimension.
    ; $v_Data - The data to be written.
    ; $sv_Type - (optional) The "Type" of data you intend to write at the destination
    ; address. This is set to 'dword'(32bit(4byte) signed integer) by
    ; default. See the help file for DllStructCreate for all types.
    ; Requirement(s): The $ah_Handle returned from _MemoryOpen.
    ; Return Value(s): On Success - Returns the destination address.
    ; On Failure - Returns 0.
    ; @Error - 0 = No error.
    ; 1 = $av_Offset is not an array.
    ; 2 = Invalid $ah_Handle.
    ; 3 = Failed to read from the specified process.
    ; 4 = $sv_Type is not a string.
    ; 5 = $sv_Type is an unknown data type.
    ; 6 = Failed to allocate the memory needed for the DllStructure.
    ; 7 = Error allocating memory for $sv_Type.
    ; 8 = $v_Data is not in the proper format to be used with the
    ; "Type" selected for $sv_Type, or it is out of range.
    ; 9 = Failed to write to the specified process.
    ; Author(s): Nomad
    ; Note(s): Data written is in Decimal format, unless a 'char' type is selected.
    ; Set $av_Offset like this:
    ; $av_Offset[0] = NULL (not used, doesn't matter what's entered)
    ; $av_Offset[1] = Offset for pointer 1 (all offsets must be in Decimal)
    ; $av_Offset[2] = Offset for pointer 2
    ; etc...
    ; (The number of array dimensions determines the number of pointers)
    ;=================================================================================================
    Func _MemoryPointerWrite ($iv_Address, $ah_Handle, $av_Offset, $v_Data, $sv_Type = 'dword')

    [/autoit] [autoit][/autoit] [autoit]

    If IsArray($av_Offset) Then
    If IsArray($ah_Handle) Then
    Local $iv_PointerCount = UBound($av_Offset) - 1
    Else
    SetError(2)
    Return 0
    EndIf
    Else
    SetError(1)
    Return 0
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Local $iv_StructData, $i
    Local $v_Buffer = DllStructCreate('dword')

    [/autoit] [autoit][/autoit] [autoit]

    For $i = 0 to $iv_PointerCount
    If $i = $iv_PointerCount Then
    $v_Buffer = DllStructCreate($sv_Type)
    If @Error Then
    SetError(@Error + 3)
    Return 0
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    DllStructSetData($v_Buffer, 1, $v_Data)
    If @Error Then
    SetError(8)
    Return 0
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    $iv_Address = '0x' & hex($iv_StructData + $av_Offset[$i])
    DllCall($ah_Handle[0], 'int', 'WriteProcessMemory', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer), 'int', '')
    If @Error Then
    SetError(9)
    Return 0
    Else
    Return $iv_Address
    EndIf
    ElseIf $i = 0 Then
    DllCall($ah_Handle[0], 'int', 'ReadProcessMemory', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer), 'int', '')
    If @Error Then
    SetError(3)
    Return 0
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    $iv_StructData = DllStructGetData($v_Buffer, 1)

    [/autoit] [autoit][/autoit] [autoit]

    Else
    $iv_Address = '0x' & hex($iv_StructData + $av_Offset[$i])
    DllCall($ah_Handle[0], 'int', 'ReadProcessMemory', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer), 'int', '')
    If @Error Then
    SetError(3)
    Return 0
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    $iv_StructData = DllStructGetData($v_Buffer, 1)

    [/autoit] [autoit][/autoit] [autoit]

    EndIf
    Next

    [/autoit] [autoit][/autoit] [autoit]

    EndFunc

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    ;==================================================================================
    ; Function: SetPrivilege( $privilege, $bEnable )
    ; Description: Enables (or disables) the $privilege on the current process
    ; (Probably) requires administrator privileges to run
    ;
    ; Author(s): Larry (from autoitscript.com's Forum)
    ; Notes(s):
    ; http://www.autoitscript.com/forum/index.ph…ndpost&p=223999
    ;==================================================================================
    #comments-start
    Func SetPrivilege( $privilege, $bEnable )

    [/autoit] [autoit][/autoit] [autoit]

    Const $TOKEN_ADJUST_PRIVILEGESS = 0x0020
    Const $TOKEN_QUERYS = 0x0008
    Const $SE_PRIVILEGE_ENABLEDS = 0x0002
    Local $hToken, $SP_auxret, $SP_ret, $hCurrProcess, $nTokens, $nTokenIndex, $priv
    $nTokens = 1
    $LUID = DLLStructCreate("dword;int")
    If IsArray($privilege) Then $nTokens = UBound($privilege)
    $TOKEN_PRIVILEGES = DLLStructCreate("dword;dword[" & (3 * $nTokens) & "]")
    $NEWTOKEN_PRIVILEGES = DLLStructCreate("dword;dword[" & (3 * $nTokens) & "]")
    $hCurrProcess = DLLCall("kernel32.dll","hwnd","GetCurrentProcess")
    $SP_auxret = DLLCall("advapi32.dll","int","OpenProcessToken","hwnd",$hCurrProcess[0], _
    "int",BitOR($TOKEN_ADJUST_PRIVILEGESS,$TOKEN_QUERYS),"int_ptr",0)
    If $SP_auxret[0] Then
    $hToken = $SP_auxret[3]
    DLLStructSetData($TOKEN_PRIVILEGES,1,1)
    $nTokenIndex = 1
    While $nTokenIndex <= $nTokens
    If IsArray($privilege) Then
    $priv = $privilege[$nTokenIndex-1]
    Else
    $priv = $privilege
    EndIf
    $ret = DLLCall("advapi32.dll","int","LookupPrivilegeValue","str","","str",$priv, _
    "ptr",DLLStructGetPtr($LUID))
    If $ret[0] Then
    If $bEnable Then
    DLLStructSetData($TOKEN_PRIVILEGES,2,$SE_PRIVILEGE_ENABLEDS,(3 * $nTokenIndex))
    Else
    DLLStructSetData($TOKEN_PRIVILEGES,2,0,(3 * $nTokenIndex))
    EndIf
    DLLStructSetData($TOKEN_PRIVILEGES,2,DllStructGetData($LUID,1),(3 * ($nTokenIndex-1)) + 1)
    DLLStructSetData($TOKEN_PRIVILEGES,2,DllStructGetData($LUID,2),(3 * ($nTokenIndex-1)) + 2)
    DLLStructSetData($LUID,1,0)
    DLLStructSetData($LUID,2,0)
    EndIf
    $nTokenIndex += 1
    WEnd
    $ret = DLLCall("advapi32.dll","int","AdjustTokenPrivileges","hwnd",$hToken,"int",0, _
    "ptr",DllStructGetPtr($TOKEN_PRIVILEGES),"int",DllStructGetSize($NEWTOKEN_PRIVILEGES), _
    "ptr",DllStructGetPtr($NEWTOKEN_PRIVILEGES),"int_ptr",0)
    $f = DLLCall("kernel32.dll","int","GetLastError")
    EndIf
    $NEWTOKEN_PRIVILEGES=0
    $TOKEN_PRIVILEGES=0
    $LUID=0
    If $SP_auxret[0] = 0 Then Return 0
    $SP_auxret = DLLCall("kernel32.dll","int","CloseHandle","hwnd",$hToken)
    If Not $ret[0] And Not $SP_auxret[0] Then Return 0
    return $ret[0]
    EndFunc ;==>SetPrivilege
    #comments-end
    ;===================================================================================================

    [/autoit] [autoit][/autoit] [autoit]

    ; Function........: _MemoryGetBaseAddress($ah_Handle, $iHD)
    ;
    ; Description.....: Reads the 'Allocation Base' from the open process.
    ;
    ; Parameter(s)....: $ah_Handle - An array containing the Dll handle and the handle of the open
    ; process as returned by _MemoryOpen().
    ; $iHD - Return type:
    ; |0 = Hex (Default)
    ; |1 = Dec
    ;
    ; Requirement(s)..: A valid process ID.
    ;
    ; Return Value(s).: On Success - Returns the 'allocation Base' address and sets @Error to 0.
    ; On Failure - Returns 0 and sets @Error to:
    ; |1 = Invalid $ah_Handle.
    ; |2 = Failed to find correct allocation address.
    ; |3 = Failed to read from the specified process.
    ;
    ; Author(s).......: Nomad. Szhlopp.
    ; URL.............: http://www.autoitscript.com/forum/index.php?showtopic=78834
    ; Note(s).........: Go to http://Www.CheatEngine.org for the latest version of CheatEngine.
    ;===================================================================================================

    [/autoit] [autoit][/autoit] [autoit]

    Func _MemoryGetBaseAddress($ah_Handle, $iHexDec = 0)

    [/autoit] [autoit][/autoit] [autoit]

    Local $iv_Address = 0x00100000
    Local $v_Buffer = DllStructCreate('dword;dword;dword;dword;dword;dword;dword')
    Local $vData
    Local $vType

    [/autoit] [autoit][/autoit] [autoit]

    If Not IsArray($ah_Handle) Then
    SetError(1)
    Return 0
    EndIf

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    DllCall($ah_Handle[0], 'int', 'VirtualQueryEx', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer))

    [/autoit] [autoit][/autoit] [autoit]

    If Not @Error Then

    [/autoit] [autoit][/autoit] [autoit]

    $vData = Hex(DllStructGetData($v_Buffer, 2))
    $vType = Hex(DllStructGetData($v_Buffer, 3))

    [/autoit] [autoit][/autoit] [autoit]

    While $vType <> "00000080"
    DllCall($ah_Handle[0], 'int', 'VirtualQueryEx', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer))
    $vData = Hex(DllStructGetData($v_Buffer, 2))
    $vType = Hex(DllStructGetData($v_Buffer, 3))
    If Hex($iv_Address) = "01000000" Then ExitLoop
    $iv_Address += 65536

    [/autoit] [autoit][/autoit] [autoit]

    WEnd

    [/autoit] [autoit][/autoit] [autoit]

    If $vType = "00000080" Then
    SetError(0)
    If $iHexDec = 1 Then
    Return Dec($vData)
    Else
    Return $vData
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Else
    SetError(2)
    Return 0
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Else
    SetError(3)
    Return 0
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    EndFunc ;==>_MemoryGetBaseAddress

    [/autoit] [autoit][/autoit] [autoit]

    Func _MemoryModuleGetBaseAddress($iPID, $sModule)
    If Not ProcessExists($iPID) Then Return SetError(1, 0, 0)

    [/autoit] [autoit][/autoit] [autoit]

    If Not IsString($sModule) Then Return SetError(2, 0, 0)

    [/autoit] [autoit][/autoit] [autoit]

    Local $PSAPI = DllOpen("psapi.dll")

    [/autoit] [autoit][/autoit] [autoit]

    ;Get Process Handle
    Local $hProcess
    Local $PERMISSION = BitOR(0x0002, 0x0400, 0x0008, 0x0010, 0x0020) ; CREATE_THREAD, QUERY_INFORMATION, VM_OPERATION, VM_READ, VM_WRITE

    [/autoit] [autoit][/autoit] [autoit]

    If $iPID > 0 Then
    Local $hProcess = DllCall("kernel32.dll", "ptr", "OpenProcess", "dword", $PERMISSION, "int", 0, "dword", $iPID)
    If $hProcess[0] Then
    $hProcess = $hProcess[0]
    EndIf
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    ;EnumProcessModules
    Local $Modules = DllStructCreate("ptr[1024]")
    Local $aCall = DllCall($PSAPI, "int", "EnumProcessModules", "ptr", $hProcess, "ptr", DllStructGetPtr($Modules), "dword", DllStructGetSize($Modules), "dword*", 0)
    If $aCall[4] > 0 Then
    Local $iModnum = $aCall[4] / 4
    Local $aTemp
    For $i = 1 To $iModnum
    $aTemp = DllCall($PSAPI, "dword", "GetModuleBaseNameW", "ptr", $hProcess, "ptr", Ptr(DllStructGetData($Modules, 1, $i)), "wstr", "", "dword", 260)
    If $aTemp[3] = $sModule Then
    DllClose($PSAPI)
    Return Ptr(DllStructGetData($Modules, 1, $i))
    EndIf
    Next
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    DllClose($PSAPI)
    Return SetError(-1, 0, 0)

    [/autoit] [autoit][/autoit] [autoit]

    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    #endregion

    [/autoit] [autoit][/autoit] [autoit]

    Func _MemoryScanEx($ah_Handle, $pattern, $mask, $after = False, $iv_addrStart = 0x00400000, $iv_addrEnd = 0x00FFFFFF, $step = 51200)
    If Not IsArray($ah_Handle) Then
    SetError(1)
    Return -1
    EndIf
    $pattern = StringRegExpReplace($pattern, "[^0123456789ABCDEFabcdef.]", "")
    If StringLen($pattern) = 0 Then
    SetError(2)
    Return -2
    EndIf
    If StringLen($pattern) / 2 <> StringLen($mask) Then
    SetError(4)
    Return -4
    EndIf
    Local $formatedpattern = ""
    Local $BufferPattern
    Local $BufferMask
    For $i = 0 To StringLen($mask) - 1
    $BufferPattern = StringLeft($pattern, 2)
    $pattern = StringRight($pattern, StringLen($pattern) - 2)
    $BufferMask = StringLeft($mask, 1)
    $mask = StringRight($mask, StringLen($mask) - 1)
    If $BufferMask = "?" Then $BufferPattern = ".."
    $formatedpattern = $formatedpattern & $BufferPattern
    Next
    $pattern = $formatedpattern
    For $addr = $iv_addrStart To $iv_addrEnd Step $step - (StringLen($pattern) / 2)
    StringRegExp(_MemoryRead($addr, $ah_Handle, "byte[" & $step & "]"), $pattern, 1, 2)
    If Not @error Then
    If $after Then
    Return StringFormat("0x%.8X", $addr + ((@extended - 2) / 2))
    Else
    Return StringFormat("0x%.8X", $addr + ((@extended - StringLen($pattern) - 2) / 2))
    EndIf
    EndIf
    Next
    SetError(3)
    Return -3
    EndFunc ;==>_MemoryScanEx

    [/autoit]

    und da sich die Adresse hinter einer DLL versteckt war das ganze etwas schwieriger
    hier mein Script

    Spoiler anzeigen
    [autoit]


    #include <MemoryPointer.au3>
    Global $PID
    Global $sModule = "RazerConfigNative.dll"
    Global $StaticOffset
    Global $openmem

    [/autoit] [autoit][/autoit] [autoit]

    $PID = ProcessExists("RzSynapse.exe")

    [/autoit] [autoit][/autoit] [autoit]

    If $PID = 0 Then
    MsgBox(4096,"Error","Razer Maus Tool läuft nicht!",3)
    exit
    EndIf
    $openmem = _MemoryOpen($PID)

    [/autoit] [autoit][/autoit] [autoit]

    If @error Then
    Return
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    Local $Offset[1]
    $Offset[0] = 0

    [/autoit] [autoit][/autoit] [autoit]

    $StaticOffset = Dec("0049FA60")

    [/autoit] [autoit][/autoit] [autoit]

    $baseADDR = _MemoryModuleGetBaseAddress($PID, $sModule)
    $finalADDR = "0x" & Hex($baseADDR + $StaticOffset)

    [/autoit] [autoit][/autoit] [autoit]

    $r = _MemoryRead($finaladdr,$openmem)
    $r = _MemoryRead($r + 0x190,$openmem)
    $r = _MemoryRead($r + 0x0,$openmem)
    $r = _MemoryRead($r + 0xb0,$openmem)
    $r = _MemoryRead($r + 0x470,$openmem)
    $r = _MemoryRead($r + 0x1FC,$openmem, "dword")

    [/autoit] [autoit][/autoit] [autoit]

    MsgBox(0,"Aktuelle DPI ", "Die DPI ist: " & $r)

    [/autoit]

    jetzt muss ich das nur noch in das script für das G510s lcd Display einpflegen und dann sollte es klappen

    so hier das fertige script

    Spoiler anzeigen
    [autoit]


    #include <String.au3>
    #include <AdvanceLCD.au3>
    #include <Array.au3>
    #include <MemoryPointer.au3>
    Global $PID
    Global $sModule = "RazerConfigNative.dll"
    Global $StaticOffset
    Global $openmem
    LcdInitialize()
    $hApplet = LcdCreateApplet("DPI-Anzeige", $LCD_DEVICE_MONO, 0, 1)
    LcdWaitActivation($hApplet)
    LcdSetPriority($hApplet, $LCD_PRIORITY_NORMAL, 1)
    LcdClear($hApplet, 0x000000)

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    func _ausgabe()
    LcdClear($hApplet, 0x000000)
    $hFont1 = LcdLoadFont("Arial", 12, $LCD_FONT_DEFAULT, "Arial.ttf")
    LcdSetFont($hApplet, $hFont1)
    LcdSetPriority($hApplet, $LCD_PRIORITY_NORMAL, 1)
    LcdDrawText($hApplet, "Aktuelle DPI", 50,0)
    $hFont = LcdLoadFont("6pxbus", 20, $LCD_FONT_DEFAULT, "6pxbus.ttf")
    LcdSetFont($hApplet, $hFont)
    LcdDrawText($hApplet, $r, 50,10)
    LcdUpdate($hApplet, 0)
    EndFunc

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    while 1
    $PID = ProcessExists("RzSynapse.exe")
    $openmem = _MemoryOpen($PID)
    Local $Offset[1]
    $Offset[0] = 0
    $StaticOffset = Dec("0049FA60")
    $baseADDR = _MemoryModuleGetBaseAddress($PID, $sModule)
    $finalADDR = "0x" & Hex($baseADDR + $StaticOffset)
    $r = _MemoryRead($finaladdr,$openmem)
    $r = _MemoryRead($r + 0x190,$openmem)
    $r = _MemoryRead($r + 0x0,$openmem)
    $r = _MemoryRead($r + 0xb0,$openmem)
    $r = _MemoryRead($r + 0x470,$openmem)
    $r = _MemoryRead($r + 0x1FC,$openmem, "dword")
    $txtdpi = filereadline("dpi.txt", 1)
    if $r <> $txtdpi Then
    FileDelete("dpi.txt")
    FileWrite("dpi.txt",$r)
    _ausgabe()
    endif

    [/autoit] [autoit][/autoit] [autoit]

    wend

    [/autoit] [autoit][/autoit] [autoit][/autoit]


    habe es nochmal überarbeitet da die Logitech Software damit nicht so klar kam

    Hier noch ein Video wie das ganze dann Aussicht

    DPI Anzeige von einer Razer Ouroboros auf G510s LCD Display

    3 Mal editiert, zuletzt von Stalker (4. Oktober 2014 um 14:43)

  • Ich habe nun ein ähnliches Problem nochmal an einem anderen PC

    Und zwar möchte ich die DPI anzahl von einer Logitech Maus auslesen. Pointer und Offset habe ich schon gefunden.

    mein script sieht dann so aus

    Spoiler anzeigen
    [autoit]


    #include <String.au3>
    #include <Array.au3>
    #include <MemoryPointer.au3>
    Global $PID
    Global $StaticOffset
    Global $openmem

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    $PID = ProcessExists("LCore.exe")
    $openmem = _MemoryOpen($PID)
    Local $Offset[1]
    $Offset[0] = 0
    $StaticOffset = Dec("1424508D0")
    $baseADDR = _MemoryGetBaseAddress($PID)
    $finalADDR = "0x" & Hex($baseADDR + $StaticOffset)
    $r = _MemoryRead($finaladdr,$openmem)
    $r = _MemoryRead($r + 0x5d0,$openmem)
    $r = _MemoryRead($r + 0xa0,$openmem)
    $r = _MemoryRead($r + 0x310,$openmem)
    $r = _MemoryRead($r + 0x2700,$openmem)
    $r = _MemoryRead($r + 0x164,$openmem, "dword")

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    MsgBox(0," ", $r)

    [/autoit] [autoit][/autoit] [autoit][/autoit]

    ich bekomme aber immer null raus oder das letzte Offset.

    liegt das vielleicht daran das es eine 64bit exe ist von dem Logitech Tool? Und dadurch es eine 8Byte Adresse ist?