Omnimaga
General Discussion => Technology and Development => Computer Programming => Topic started by: stevon8ter on August 04, 2012, 05:09:32 am
-
So, in mw3 there's a pointer for your nickname (p->09C97AF2) , how can i write/read to that pointer?
-
I don't know C#, but I'll give it a go in explanation.
char*[] p = 09C97AF2; //The nickname will be an array of chars, so we set a pointer to that address
p* = "New Nickname"; //Assign the new data to the pointer
And that *should* work, but I don't know C#, only C/C++. :P
-
Hmm, in c# it is a string, if i looked it up Ith cheatengine i looked for a string but thx anyway
-
A string is nothing more than an array of chars, at least in C++. No reason it's not the same for C#
Just to note, I believe I've heard it somewhere that each program has it's own memory space for pointers, so an address in one program wouldn't equal the address in another. So you might not be able to easily access the memory of an external program like that. But, then again I'm not 100% sure.
If it's in cheat engine, you should be able to modify the string through that.
-
You cant use pointers in C#.
A pointer is only in existance as long as the program is running, what are you trying to do?
Also HOMER-16 is correct, almost all os's use something called virtual memory, so that address is actualy not the physical address.
-
jwalker, you can use pointers in c#.
http://msdn.microsoft.com/en-us/library/y31yhkeb(v=vs.80).aspx (http://msdn.microsoft.com/en-us/library/y31yhkeb(v=vs.80).aspx)
I believe he is trying to write a program that will change his MW3 nickname. He's trying to read/write to the address that contains it.
-
You can indeed use pointers like in C, but you have to use an unsafe block.
-
A string is nothing more than an array of chars, at least in C++. No reason it's not the same for C#
Just to note, I believe I've heard it somewhere that each program has it's own memory space for pointers, so an address in one program wouldn't equal the address in another. So you might not be able to easily access the memory of an external program like that. But, then again I'm not 100% sure.
C# is not a language in the same family as C/C++. It's much closer to Java than any compiled language. The name is just confusing in that respect.
As for whether you can use pointers, generally you can. The most common form of "pointer" in C# is what's called a "reference." It's basically meaningless obfuscation to call it that, but you can think of them as effectively pointers with some associated metadata for the interpreter.
@Homer, you should NEVER be accessing another program's memory space, so virtual memory isn't an issue. Besides, physical pointers in modern computers are far more complex to deal with than virtual pointers. Either way, use the interface the other code exposes. It is the best way to interact with other code.
-
I think i first had to get the adress of the external prog, for mw3 that would be looking for the adress for "iw5", google it and i find the method, but i don't get how to write/read it's pointers then, just adresses work, but pointers are a lot more difficult, as for changing it with cheatengine, that works, but i want it to be a feature in my hack, there are(/were) namechangers before...
-
Sorry for double post
But does someone know if it's possible to use a little part of c/++ code in c#?
Cause that would be much easyer for pointers