 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
thedebutent Newbie cheater
Reputation: 0
Joined: 30 Dec 2015 Posts: 11
|
Posted: Sat May 21, 2016 9:25 am Post subject: how to get the hexadecimal value |
|
|
Hello,
I want to know how to get the hex value?
here is my code to get a decimal value:
| Code: | Public Function ReadInteger(ByVal ProcessName As String, ByVal Address As Integer, Optional ByVal nsize As Integer = 4) As Integer
Dim hProcess As IntPtr = OpenProcess(&H1F0FF, 0, p(0).Id)
If hProcess = IntPtr.Zero Then
MessageBox.Show("Impossible d'ouvrir " & ProcessName & "!")
Return False
End If
Dim hAddress, vBuffer As Integer
hAddress = Address
ReadProcessMemory1(hProcess, hAddress, vBuffer, nsize, 4)
CloseHandle(hProcess)
Return vBuffer
End Function |
Can you help me how to get a hexadecimal value relative offset?
Thank you for your reply,
| Description: |
|
| Filesize: |
64.09 KB |
| Viewed: |
14864 Time(s) |

|
|
|
| Back to top |
|
 |
Zanzer I post too much
Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
|
| Back to top |
|
 |
thedebutent Newbie cheater
Reputation: 0
Joined: 30 Dec 2015 Posts: 11
|
Posted: Sat May 21, 2016 2:23 pm Post subject: |
|
|
Good evening,
I found the solution to my problem .
my code :
| Code: | Public Function ReadHex(ByVal ProcessName As String, ByVal Address As Integer, Optional ByVal nsize As Integer = 4) As Integer
Dim hProcess As IntPtr = OpenProcess(&H1F0FF, 0, p(0).Id)
If hProcess = IntPtr.Zero Then
MessageBox.Show("Impossible d'ouvrir " & ProcessName & "!")
Return False
End If
Dim hAddress, vBuffer As Integer
hAddress = Address
ReadProcessMemory1(hProcess, hAddress, vBuffer, nsize, 0)
CloseHandle(hProcess)
Return conversion.hex(vBuffer)
End Function |
| Description: |
|
| Filesize: |
10.43 KB |
| Viewed: |
14825 Time(s) |

|
|
|
| Back to top |
|
 |
thedebutent Newbie cheater
Reputation: 0
Joined: 30 Dec 2015 Posts: 11
|
Posted: Sun May 22, 2016 7:06 am Post subject: |
|
|
hello,
reading problem compared to hexadecimal:
my code change :
| Code: | Private Function ReadHex(ByVal ProcessName As String, ByVal Address As Integer, Optional ByVal nsize As Integer = 4) As String
Dim hProcess As IntPtr = OpenProcess(&H1F0FF, 0, p(0).Id)
If hProcess = IntPtr.Zero Then
MessageBox.Show("Impossible d'ouvrir " & ProcessName & "!")
Return False
End If
Dim hAddress, vBuffer As Integer
hAddress = Address
ReadProcessMemory1(hProcess, hAddress, vBuffer, nsize, 0)
CloseHandle(hProcess)
Dim hexChar As String = Conversion.Hex(vBuffer)
Dim Hex As String = Strings.StrReverse(hexChar)
Return Hex
End Function |
how do you get the same hexadecimal value in the blue square?
| Description: |
| the hexadecimal value I want in the blue square |
|
| Filesize: |
110.69 KB |
| Viewed: |
14721 Time(s) |

|
| Description: |
|
| Filesize: |
2.65 KB |
| Viewed: |
14721 Time(s) |

|
|
|
| Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 152
Joined: 06 Jul 2014 Posts: 4709
|
Posted: Sun May 22, 2016 9:37 am Post subject: |
|
|
Any number that takes up multiple bytes is usually stored with the bytes in reverse order such that the least significant byte is stored first. Look up "little-endian" for more information.
A couple examples:
| Code: | dec hex AoB
1,999,388,785 = 772C4071 = 71 40 2C 77
19,658,094 = 012BF56E = 6E F5 2B 01 |
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|