MemoryPointer Problem

05/02/2012 18:48 Krasti#1
I got a problem in MemoryPointerWrite...
I've made a button which will write to a pointer the value of Inputbox

Code:
_MemoryPointerWrite($base ,$OPEN,$offset,GUICtrlRead($Input1),"dword")
i use that function
the adress and offset has been tested and work..
i wrote offset like that

Code:
Global Const $offset[1] = [0x*]
and addy

[code]
Global Const $base = 0x******
05/02/2012 20:31 K1ramoX#2
Whats the return value of MemoryPointerWrite ?
05/02/2012 20:33 Krasti#3
Quote:
Originally Posted by Applecode View Post
Whats the return value of MemoryPointerWrite ?
What you mean?
05/02/2012 20:38 K1ramoX#4
The function MemoryPointerWrite has a return value. Succes, Fail etc ;O
05/02/2012 20:55 Krasti#5
Quote:
Originally Posted by Applecode View Post
The function MemoryPointerWrite has a return value. Succes, Fail etc ;O
The addy get value of Inputbox.
I can't really get what do u mean
05/03/2012 16:27 Primmo#6
For Project AUrora Trainer or ?
05/03/2012 19:17 K1ramoX#7
Quote:
Originally Posted by Krasti View Post
The addy get value of Inputbox.
I can't really get what do u mean
Code:
;=================================================================================================
; 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.
[COLOR="Red"][B]; 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.[/B][/COLOR]
; 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)
;=================================================================================================
This is what I mean.
05/03/2012 20:28 Krasti#8
Quote:
Originally Posted by Applecode View Post
Code:
;=================================================================================================
; 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.
[COLOR="Red"][B]; 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.[/B][/COLOR]
; 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)
;=================================================================================================
This is what I mean.
It return on @error - 9
Is it matter that i open the au3 ingame of the game?
05/03/2012 21:25 K1ramoX#9
Then try it with SeDebugPrivileges ;O
05/04/2012 14:19 Krasti#10
Quote:
Originally Posted by Applecode View Post
Then try it with SeDebugPrivileges ;O
Nothing happen.
Still it doesn't write

Code:
func _change()
_MemoryPointerWrite($base ,$OPEN,$offset,GUICtrlRead($Input1),"dword")
EndFunc
this is my func
05/04/2012 18:29 KDeluxe#11
Quote:
Originally Posted by NomadMemory.au3
Set $av_Offset like this:
$av_Offset[0] = NULL (not used, doesn't matter what's entered)
...
Quote:
Global Const $offset[2] = [0, 0x*]
05/04/2012 19:02 Krasti#12
Quote:
Originally Posted by KDeluxe View Post
Weird, but it didn't work again
05/04/2012 23:56 Primmo#13
This? o,o


#include <NomadMemory.au3>
Global $pointer = 0x009E90C8
Global $offset = "1c"
Global $ProcessID = WinGetProcess("Enemy Territory")
Global $Mem_Open = _MemoryOpen($ProcessID)
Global $Mem_Read = _MemoryPointerRead($pointer, $Mem_Open, $offset)
MsgBox(0, "", $Mem_Read)