|
You last visited: Today at 05:39
Advertisement
[Help]C# How to convert memory value to string?
Discussion on [Help]C# How to convert memory value to string? within the CO2 Programming forum part of the Conquer Online 2 category.
04/25/2010, 10:41
|
#1
|
elite*gold: 0
Join Date: Jan 2010
Posts: 121
Received Thanks: 7
|
[Help]C# How to convert memory value to string?
How to convert value to string 
this is my code Is this code right or is it wrong?
thanks in advance! 
note: I know that CloseHandle is missing
PHP Code:
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Diagnostics; using System.Runtime.InteropServices;
namespace ReadMemory_function { public partial class Form1 : Form { [DllImport("kernel32.dll")] static extern IntPtr OpenProcess(uint dwDesiredAccess, [MarshalAs(UnmanagedType.Bool)] bool bInheritHandle, int dwProcessId);
[DllImport("kernel32.dll", SetLastError = true, PreserveSig = true)] [return: MarshalAs(UnmanagedType.Bool)] public static extern bool ReadProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, byte[] lpBuffer, UIntPtr nSize, out int lpNumberOfBytesRead);
public Form1() { InitializeComponent(); }
private void button1_Click(object sender, EventArgs e) { int PID = Process.GetProcessesByName("calc")[0].Id; IntPtr hprocess = OpenProcess(0x0010, false, PID); byte[] value = new byte[4]; int num; ReadProcessMemory(hprocess, (IntPtr)0x030000, value, (UIntPtr)4, out num); } } }
|
|
|
05/04/2010, 17:25
|
#2
|
elite*gold: 0
Join Date: Nov 2005
Posts: 122
Received Thanks: 186
|
Quote:
Originally Posted by shimo diaz
How to convert value to string 
this is my code Is this code right or is it wrong?
thanks in advance! 
note: I know that CloseHandle is missing
PHP Code:
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Diagnostics; using System.Runtime.InteropServices;
namespace ReadMemory_function { public partial class Form1 : Form { [DllImport("kernel32.dll")] static extern IntPtr OpenProcess(uint dwDesiredAccess, [MarshalAs(UnmanagedType.Bool)] bool bInheritHandle, int dwProcessId);
[DllImport("kernel32.dll", SetLastError = true, PreserveSig = true)] [return: MarshalAs(UnmanagedType.Bool)] public static extern bool ReadProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, byte[] lpBuffer, UIntPtr nSize, out int lpNumberOfBytesRead);
public Form1() { InitializeComponent(); }
private void button1_Click(object sender, EventArgs e) { int PID = Process.GetProcessesByName("calc")[0].Id; IntPtr hprocess = OpenProcess(0x0010, false, PID); byte[] value = new byte[4]; int num; ReadProcessMemory(hprocess, (IntPtr)0x030000, value, (UIntPtr)4, out num); } } }
|
To get the number you're retrieving as it's string representation "1234" or the string representation of the bytes "D2-04-00-00"?
|
|
|
05/04/2010, 23:34
|
#3
|
elite*gold: 0
Join Date: Jan 2010
Posts: 121
Received Thanks: 7
|
Quote:
Originally Posted by BEanErzzz
To get the number you're retrieving as it's string representation "1234" or the string representation of the bytes "D2-04-00-00"?
|
#Delete please
thanks for your concern I already found the answer.
|
|
|
 |
Similar Threads
|
small help how to convert string to hex to make a new StatusEffect korvacs arco pro4e
07/16/2010 - CO2 Private Server - 4 Replies
now i want to know how to convert string to hexdemical to make a new StatusEffectEn in 5165 scours
or give me hexdemical for this
mate_pk_02
mate_pk_03
mate_pk_08
moonpk_eight
moonpk_second
moonpk_third
ninjapk_eight
|
C++ String aus Memory auslesen
05/08/2010 - C/C++ - 1 Replies
Hallo zusammen ;)
Ich probiere mich derzeit ein wenig mit dem auslesen des Memory in C++.
Hab mir da auch schon ne DLL gebastelt und injected... usw.
Nun habe ich ein Problem:
Ich möchte gerne den Namen meines Charakters auslesen.
Mit Cheatengine klappt das ja wunderbar und wird auch richtig angezeigt, nur wenn ich mittels der DLL versuche aus der Addresse meinen Namen auszulesen bekomm ich immer nur 1 Zeichen und das stimmt nicht einmal mit dem 1. Buchstaben meines Namens überein.
Hier...
|
Quick Memory Editor - Alternative Memory Hacking Software
11/21/2009 - Cabal Hacks, Bots, Cheats, Exploits & Macros - 11 Replies
This might be detected or not by GameGuard, I have not tested this on Official servers however it worked perfectly fine on other private servers.
http://imagenic.net/images/x0jxwzwpg2zxmkdtcf36.p ng
This is just an alternative memory editing tool.
Press thanks if this helps.
Remember, scan before using this.
Cause its 5.5MB.
|
Fragen Zur Memory!!!(Auslesen von Spawn/Memory)
12/31/2008 - Guild Wars - 3 Replies
hey leute,
ich wollte mal einen bot schreiben und nun bin ich ganz verwirrt.
könnte mir jmd bitte schritt für schritt erklären wie das mit Memory auslesen, benutzen und der Spawnpointer funktioniert.
Ich wär sehr dankbar wenn jmd kontakt mit mir aufnehmen würde...
und sobald der bot fertig ist bekommt der ihn natürlicherweise umsonst:D
ICQ: 481799773
oder hier im forum
|
String memory addres
10/28/2005 - Lineage 2 - 0 Replies
Does anyone have any ideea how i can find a desired string in the memory address???
I am trying to make a new code but i have to come up with a way to find certain string so i can edit it.
please post your ideas and progs, im sure working together is more efficient then working alone.
|
All times are GMT +1. The time now is 05:40.
|
|