VB.NET String/4Bytes adress

07/20/2011 12:09 ~>Jάson<~#1
Hey i try make a hack into a game call S4 League in VB.NET....Well the problem is the 4bytes and String adress....I mean Float in VB.NET write as Memory.WriteFloat
So how can i make 4byte hack?I tried Memory.WriteLong and WriteInt but problem :/
Also at String have problem in Memory.WriteString a error from memory.vb....
I think there is a problem in memory.vb....so can anyone help?
Sorry if i failed in english and if you don't understand what i mean
07/20/2011 20:30 Miraculi ii#2
if i got it right then it should work with
Quote:
<DllImport("kernel32.dll", SetLastError:=True)> _
Public Shared Function WriteProcessMemory(ByVal hProcess As IntPtr, ByVal lpBaseAddress As IntPtr, ByVal lpBuffer As Byte(), ByVal nSize As System.UInt32, <Out()> ByRef lpNumberOfBytesWritten As IntPtr) As Boolean
End Function
Byte() = byte
Integer() = 4byte
Single() = float

should be right ^^
07/21/2011 23:19 mgX#3
Also, since .net is managed, strings are actually in the managed space. When dealing with strings, youre actually dealing with a char* (pointer to the memory space in which the actual "string" is stored). If you tried to write a string to an unmanaged memory section, you would probably be writing the pointer instead of the content...

I suppose you could try byte blah = yourstring.ToByte();

.net tends to behave really weird when dealing with unmanaged code...
07/21/2011 23:54 ~>Jάson<~#4
I tried mem.WriteLong(blablabla) but then process won't start :/
07/22/2011 00:36 mgX#5
Well, there is another problem. string in .net is unicode, and what you want is ASCII...pretty sure at least. Are you writing to the correct address? Try converting to ascii...
07/22/2011 13:49 buFFy!#6
I don't get what you want to do.

Do you want to write a String to a specific address?
07/23/2011 01:02 ~>Jάson<~#7
Quote:
Originally Posted by mgX View Post
Well, there is another problem. string in .net is unicode, and what you want is ASCII...pretty sure at least. Are you writing to the correct address? Try converting to ascii...

Quote:
Originally Posted by u-coRe View Post
I don't get what you want to do.

Do you want to write a String to a specific address?
The adress is correct
I try mem.WriteLong but bug.the process cant start
07/23/2011 10:55 buFFy!#8
Why do you want to use WriteLong?
Please tell us exactly WHAT you want to do, and either write your best english or talk german (if you can :rolleyes:)