Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Programming
You last visited: Today at 05:39

  • Please register to post and access all features, it's quick, easy and FREE!

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.

Closed Thread
 
Old   #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 bInheritHandleint dwProcessId);

        [
DllImport("kernel32.dll"SetLastError truePreserveSig true)]
        [return: 
MarshalAs(UnmanagedType.Bool)]
        public static 
extern bool ReadProcessMemory(IntPtr hProcessIntPtr lpBaseAddress,
             
byte[] lpBufferUIntPtr nSizeout int lpNumberOfBytesRead);

        public 
Form1()
        {
            
InitializeComponent();
        }

        private 
void button1_Click(object senderEventArgs e)
        {
            
int PID Process.GetProcessesByName("calc")[0].Id;
            
IntPtr hprocess OpenProcess(0x0010falsePID);
            
byte[] value = new byte[4];
            
int num;
            
ReadProcessMemory(hprocess, (IntPtr)0x030000value, (UIntPtr)4out num);
        }
    }

shimo diaz is offline  
Old 05/04/2010, 17:25   #2
 
BEanErzzz's Avatar
 
elite*gold: 0
Join Date: Nov 2005
Posts: 122
Received Thanks: 186
Quote:
Originally Posted by shimo diaz View Post
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 bInheritHandleint dwProcessId);

        [
DllImport("kernel32.dll"SetLastError truePreserveSig true)]
        [return: 
MarshalAs(UnmanagedType.Bool)]
        public static 
extern bool ReadProcessMemory(IntPtr hProcessIntPtr lpBaseAddress,
             
byte[] lpBufferUIntPtr nSizeout int lpNumberOfBytesRead);

        public 
Form1()
        {
            
InitializeComponent();
        }

        private 
void button1_Click(object senderEventArgs e)
        {
            
int PID Process.GetProcessesByName("calc")[0].Id;
            
IntPtr hprocess OpenProcess(0x0010falsePID);
            
byte[] value = new byte[4];
            
int num;
            
ReadProcessMemory(hprocess, (IntPtr)0x030000value, (UIntPtr)4out 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"?
BEanErzzz is offline  
Thanks
1 User
Old 05/04/2010, 23:34   #3
 
elite*gold: 0
Join Date: Jan 2010
Posts: 121
Received Thanks: 7
Quote:
Originally Posted by BEanErzzz View Post
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.
shimo diaz is offline  
Closed Thread


Similar Threads 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.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.