c# memory class

Posts 1–9 of 9 · Page 1 of 1
c# memory class
As the title says I am searching for a simple c# class.

As I know it from Visual Basic one can add a module and "call" the methods in the main form. So i am searching for an easy working c# class which can read and write memory adresses.

Sure, I already searched 4 times in this forum and uncountable times in google for a memory class and I already found results, but not the resulst I want. The classes/codes I found were just too complex for me, because I want to start with c# and already have one year experiences in Java and computer science. According to memory hacking I want to go step by step and so I am searching for the easiest memory class. Here are some cutouts from the class I used in Visual Basic before. Only that you know: this module is not written by me, I just used it to make little Trainers for games like Modern Warfare 2 and I am not that much familiar with coding to write a c# class on my own.


Code:
#Region "Write"
'Writes 1 Byte
    Public Sub Write_Byte(ByVal address As Int32, ByVal value As Byte)
        Dim process_handle As Int32
        process_handle = OpenProcess(ACCESS_RIGHTS_ALL, False, process_id)
        If process_handle <> 0 Then
            WPM(process_handle, address, value, 1, 0)
        End If
        CloseHandle(process_handle)
    End Sub
#End Region

#Region "Read"
'Reads 1 Byte
    Public Function Read_Byte(ByVal address As Int32) As Byte
        Dim process_handle As Int32, value As Byte
        process_handle = OpenProcess(ACCESS_RIGHTS_ALL, False, process_id)
        If process_handle <> 0 Then
            RPM(process_handle, address, value, 1, 0)
        End If
        CloseHandle(process_handle)
        Return value
    End Function
#End Region

'to write an adress:
Write_Byte(&H12345, 120)  'adress and value, just do this methodcall with a timer
Thanks a lot for your attention.
Quote Originally Posted by xXFleshpoundXx View Post
As the title says I am searching for a simple c# class.

As I know it from Visual Basic one can add a module and "call" the methods in the main form. So i am searching for an easy working c# class which can read and write memory adresses.

Sure, I already searched 4 times in this forum and uncountable times in google for a memory class and I already found results, but not the resulst I want. The classes/codes I found were just too complex for me, because I want to start with c# and already have one year experiences in Java and computer science. According to memory hacking I want to go step by step and so I am searching for the easiest memory class. Here are some cutouts from the class I used in Visual Basic before. Only that you know: this module is not written by me, I just used it to make little Trainers for games like Modern Warfare 2 and I am not that much familiar with coding to write a c# class on my own.


Code:
#Region "Write"
'Writes 1 Byte
    Public Sub Write_Byte(ByVal address As Int32, ByVal value As Byte)
        Dim process_handle As Int32
        process_handle = OpenProcess(ACCESS_RIGHTS_ALL, False, process_id)
        If process_handle <> 0 Then
            WPM(process_handle, address, value, 1, 0)
        End If
        CloseHandle(process_handle)
    End Sub
#End Region

#Region "Read"
'Reads 1 Byte
    Public Function Read_Byte(ByVal address As Int32) As Byte
        Dim process_handle As Int32, value As Byte
        process_handle = OpenProcess(ACCESS_RIGHTS_ALL, False, process_id)
        If process_handle <> 0 Then
            RPM(process_handle, address, value, 1, 0)
        End If
        CloseHandle(process_handle)
        Return value
    End Function
#End Region

'to write an adress:
Write_Byte(&H12345, 120)  'adress and value, just do this methodcall with a timer
Thanks a lot for your attention.
I can send you one class, if you want.. add me on skype: martis011
if you need help with the general concept of memory reading, I can help explain it if you want?
I only have crossfire, pm me if you want to im.

the functions you posted looked fine..OpenProcess() and ReadProcessMemory() look right. So you just need help with the concepts?
When you define concepts with basics then you are right. I want to leant memoryediting or however one want to say it The point is, that i sure coukd take a book istea, but I think the best way to learn is learning by doing and for that one need materials, like tutorials, classes or something else. I asked for a class because a tutorial would be useless for me because i have one year experiences in Java and Java and c# are not that much different.
In the module the method's name is GetProcessId() but generally it has the main function like openprocess()
I will write you a privafe message.I never played crossfire before, but i think it will do the job as well as cod 4 (the game i have hacked before)
nono, crossfire is a...chatting program? instant messaging. I don't care for it especially, but I do use it.
I also have skype now. same thing, I don't prefer it, but I have it now.

Sorry, because you posted code, I thought you already had a class. What IM do you use? if you have skype add me, name is the same as my username here. I can *try* to explain it / answer as many questions as possible.


for clarification: you know java, but are trying to learn/do this in c#? I'm a vb coder, but I have ported some of my stuff to c#, and the MemoryManager class happens to be one of the things I've ported, so I could upload it somewhere for you, then explain it a little. ???
Also: you are semi-firmiliar with general programming concepts?
The difference between a function and a void function?
variable scoping - public, private, const, etc?
If, switch, loops ?
Classes vs Objects?
??
I thought you mean Crossfire the game I am from Germany and i have not heard from Crossfire, a chat programm, before
Sorry, but I do not know what IM means :/ And I added you in Skype.

It would be nice if you could upload it on the internet and then send me.

The topics you named are nothing new for me, I did all this in Java. So I can write If, switch, loops, deal with variables and types, with methods, heredity, abstract classes, arrays and some other stuff, I do not know what I have already learned The problem is, that although I know this basics, I cannot use this in memoryediting, because I do not have the basics in memoryhacking, for example I dont know how to declare the adresses in bytes or let my programm read the process I want to change.
I finally made a working trainer in c#. I really thought that it would be difficult, but it was really easy

I would close this topic by myself, but i think normal users cannot do this. (reported)
Posts 1–9 of 9 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?