This topic is now closed to further replies.
A few months ago I tried compiling scripts on Windows 7 x64 using NomadMemory. Everywhere I looked no one could figure out why _memoryRead() would only return 0s. The best advice that would be given is set debug privileges.
At the time I just continued compiling my scripts on Vista x64 and accepted there wasn't a solution. However, a few months back I shared my code to a few people whom were using Windows 7 x64 and had to figure out why the scripts were not working.
Here is what I found.
Anything typecast as variable1 would immediately convert to 64 bit representation, however, if typecast instead as variable2 would not.
variable1 = "0xVALUE" ;Bad, auto-converts to x64 representation variable2 = hex("VALUE") ;Good, stays as needed for x32
So i converted every instance of Variable = "0xVALUE" accordingly.
The scripts still were not reading memory, but I was able to isolate the new problem, NomadMemory would return 64 bit representation for every int value. Floats, Bytes, character arrays, etc were working fine (inherently are the same length), but int, uint, etc were not.
The workaround for this was replacing every _MemoryRead() with a function
Func _NewMemRead($Addr1, $Proc1, $type1) If $type1 = "int" Then ;I only used int, if you use uint or any other integer representation, add them in here Return (Dec(Hex(StringRegExpReplace(_MemoryRead($Addr1, $Proc1, $type1), "00000000", "", 1)))) Else Return _MemoryRead($Addr1, $Proc1, $type1) EndIf EndFunc ;==>_NewMemRead
Essentially the function would strip the extra 0s because of the conversion to x64, allowing the script to read memory.
I am writing this up many months after the fact, At this time I cannot remember why I had to type cast the result to Hex and then Dec to get it to return the proper integer value. But it is probably the first problem mentioned above about the value being typecast to the wrong format.
I hope this helps anyone out there who is looking for a solution to this problem.