myGully.com Boerse.SH - BOERSE.AM - BOERSE.IO - BOERSE.IM Boerse.BZ .TO Nachfolger
Zurück   myGully.com > Computer & Technik > Programmierung
Seite neu laden

AutoIt to VB.NET

Willkommen

myGully

Links

Forum

 
 
 
Themen-Optionen Ansicht
Prev Vorheriger Beitrag   Nächster Beitrag Next
Ungelesen 15.01.11, 19:36   #1
.ShoXx!
 
Benutzerbild von .ShoXx!
 
Registriert seit: Dec 2009
Beiträge: 792
Bedankt: 49
.ShoXx! ist noch neu hier! | 8 Respekt Punkte
Standard AutoIt to VB.NET

Hallo, ich versuche grade ein kleines in AutoIt geschriebenes Tool nochmal in VB.NET nachzubauen und komme bei einem Abschnitt nicht weiter..vielleicht gibt es hier ja welche die beide Sprachen können (kann natürlich auch C# sein, ist ja eigentlich fast das selbe, außerdem gibts da dann auch Converter)
Also folgender AutoIt-Code:

Code:
If memread($mid, 0x56E2D, 'byte[2]') = '0x3EB2' Then
	memwrite($mid, 0x56E2D, 'EB')
EndIf
Hier sind noch die beiden Funktionen(?):
Code:
Func memread($mid, $adress, $type = 'dword')
	Local $struct = DllStructCreate($type)
	DllCall($kernel32, 'int', 'ReadProcessMemory', 'int', $mid, 'int', $adress, 'ptr', DllStructGetPtr($struct), 'int', DllStructGetSize($struct), 'int', '')
	Return DllStructGetData($struct, 1)
EndFunc   ;==>memread

Func memwrite($mid, $adress, $hex)
	Local $struct = DllStructCreate('byte[' & BinaryLen('0x' & $hex) & ']')
	For $i = DllStructGetSize($struct) To 1 Step - 1
		DllStructSetData($struct, 1, BinaryMid('0x' & $hex, $i, 1), $i)
	Next
	Local $x = DllCall($kernel32, 'int', 'VirtualProtectEx', 'int', $mid, 'ptr', $adress, 'int', DllStructGetSize($struct), 'dword', 0x40, 'dword*', 0)
	DllCall($kernel32, 'int', 'WriteProcessMemory', 'int', $mid, 'int', $adress, 'ptr', DllStructGetPtr($struct), 'int', DllStructGetSize($struct), 'int', 0)
	DllCall($kernel32, 'int', 'VirtualProtectEx', 'int', $mid, 'ptr', $adress, 'int', DllStructGetSize($struct), 'dword', $x[5], 'dword*', 0)
EndFunc   ;==>memwrite
Was ich auch nicht verstehe ist, wie kann man in einer Funktion eine DLL aufrufen? In VB.NET gibt es ja die Read-/ WriteProcessMemory APIs. Muss ich also nur die verwenden und brauch gar keine Funktionen oder wie?
__________________
To succeed you have to stop being ordinary and be legen - wait for it - dary.
.ShoXx! ist offline  
 


Forumregeln
Du kannst keine neue Themen eröffnen
Du kannst keine Antworten verfassen
Du kannst keine Anhänge posten
Du kannst nicht deine Beiträge editieren

BB code is An
Smileys sind An.
[IMG] Code ist An.
HTML-Code ist Aus.

Gehe zu


Alle Zeitangaben in WEZ +1. Es ist jetzt 23:53 Uhr.


Sitemap

().