SeKaSoft Posted November 20, 2023 Posted November 20, 2023 (edited) Greetings to everyone DllStructGetPtr,DllStructGetdata,DllStructGetSize,DllStructSetData,DllStructCreate I really need these functions for C#, can you help me? Quote Func _memorypointerwrite($address, $handle, $offset, $data, $type = "dword", $8byte = False) Local $buffer_data, $i $pointercount = UBound($offset) - 1 If $8byte Then $buffer = DllStructCreate("LONG_PTR") Else $buffer = DllStructCreate("dword") EndIf For $i = 0 To $pointercount If ($i == $pointercount) Then $buffer = DllStructCreate($type) DllStructSetData($buffer, 1, $data) $address = "0x" & Hex(Int(($buffer_data) + $offset[$i])) $pointerwrite = _winapi_writeprocessmemory($handle, $address, DllStructGetPtr($buffer), DllStructGetSize($buffer), $v_data) Return $address ElseIf ($i == 0) Then _winapi_readprocessmemory($handle, $address, DllStructGetPtr($buffer), DllStructGetSize($buffer), $v_data) $buffer_data = DllStructGetData($buffer, 1) Else $address = "0x" & Hex(Int(($buffer_data) + $offset[$i])) _winapi_readprocessmemory($handle, $address, DllStructGetPtr($buffer), DllStructGetSize($buffer), $v_data) $buffer_data = DllStructGetData($buffer, 1) EndIf Next If @error Then Return -1 EndIf Return True EndFunc Edited November 20, 2023 by SeKaSoft
argumentum Posted November 21, 2023 Posted November 21, 2023 22 hours ago, SeKaSoft said: I really need these functions for C#, can you help me? Is not in the forum rules but, this is an AutoIt forum. You should ask at a C# forum. You will find more people using C# at such forum than you'll find here. Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now