How to use Pointer + Offset in C#? Question in title ^_^

Posts 115 of 23 · Page 1 of 2
How to use Pointer + Offset in C#? Question in title ^_^
How to use Pointer + Offset in C#?

Question in title ^_^
Quote Originally Posted by _PuRe.LucK* View Post
How to use Pointer + Offset in C#?

Question in title ^_^
Example using Jorn's class:

Code:
WriteFloat(ReadInteger(0x12345678) + 0xC), 15);
Quote Originally Posted by Lovroman View Post
Example using Jorn's class:

Code:
WriteFloat(ReadInteger(0x12345678) + 0xC), 15);
Doesn't works for me sry ;(

---------- Post added at 09:18 AM ---------- Previous post was at 09:16 AM ----------

Quote Originally Posted by Lovroman View Post
Example using Jorn's class:

Code:
WriteFloat(ReadInteger(0x12345678) + 0xC), 15);
Because in jorns(jorndel) isn't readfloat and readinteger ?!

Can you give me source of WriteFloat please?
Quote Originally Posted by _PuRe.LucK* View Post
Doesn't works for me sry ;(

---------- Post added at 09:18 AM ---------- Previous post was at 09:16 AM ----------



Because in jorns(jorndel) isn't readfloat and readinteger ?!

Can you give me source of WriteFloat please?
There isn't WriteFloat/ReadFloat in his class, you have to add it manualy .
ReadInteger is there
Quote Originally Posted by Lovroman View Post
There isn't WriteFloat/ReadFloat in his class, you have to add it manualy .
ReadInteger is there
Whats the source of float?

ANd thanks
Quote Originally Posted by _PuRe.LucK* View Post
Whats the source of float?

ANd thanks
Add new Write Function:

Code:
 private void Write(int Address, float Value)
        {
            byte[] Buffer = BitConverter.GetBytes(Value);
            IntPtr Zero = IntPtr.Zero;
            WriteProcessMemory(pHandel, (IntPtr)Address, Buffer, (UInt32)Buffer.Length, out Zero);
        }
And new WriteFloat & ReadFloat functions:
Code:
  public void WriteFloat(int Address, float Value)
        {
            Write(Address, Value);
        }
Code:
  public float ReadFloat(int Address, int Length = 4)
        {
            return (float)BitConverter.ToDouble(Read(Address, Length), 0);
        }
Quote Originally Posted by Lovroman View Post
Add new Write Function:

Code:
 private void Write(int Address, float Value)
        {
            byte[] Buffer = BitConverter.GetBytes(Value);
            IntPtr Zero = IntPtr.Zero;
            WriteProcessMemory(pHandel, (IntPtr)Address, Buffer, (UInt32)Buffer.Length, out Zero);
        }
And new WriteFloat & ReadFloat functions:
Code:
  public void WriteFloat(int Address, float Value)
        {
            Write(Address, Value);
        }
Code:
  public float ReadFloat(int Address, int Length = 4)
        {
            return (float)BitConverter.ToDouble(Read(Address, Length), 0);
        }
Oh thanks guy
I'll give u credits
Quote Originally Posted by _PuRe.LucK* View Post
Oh thanks guy
I'll give u credits
You don't have to, but do it if you want .No problem.
Quote Originally Posted by Lovroman View Post
You don't have to, but do it if you want .No problem.
I must give you credits
Quote Originally Posted by _PuRe.LucK* View Post
I must give you credits
OK !
Don't forget, this is just example using Float pointer, pointers aren't always float .
Quote Originally Posted by Lovroman View Post
OK !
Don't forget, this is just example using Float pointer, pointers aren't always float .
Yoo, I know D

---------- Post added at 09:43 AM ---------- Previous post was at 09:38 AM ----------

Quote Originally Posted by Lovroman View Post
OK !
Don't forget, this is just example using Float pointer, pointers aren't always float .
And can i do it like this:


private void Write(int Address, float Value)
{
byte[] Buffer = BitConverter.GetBytes(Value);
IntPtr Zero = IntPtr.Zero;
WriteProcessMemory(pHandel, (IntPtr)Address, Buffer, (UInt32)Buffer.Length, out Zero);
}

and for integer

private void Write2(int Address, int Value)
{
byte[] Buffer = BitConverter.GetBytes(Value);
IntPtr Zero = IntPtr.Zero;
WriteProcessMemory(pHandel, (IntPtr)Address, Buffer, (UInt32)Buffer.Length, out Zero);
}
Quote Originally Posted by _PuRe.LucK* View Post
Yoo, I know D

---------- Post added at 09:43 AM ---------- Previous post was at 09:38 AM ----------



And can i do it like this:


private void Write(int Address, float Value)
{
byte[] Buffer = BitConverter.GetBytes(Value);
IntPtr Zero = IntPtr.Zero;
WriteProcessMemory(pHandel, (IntPtr)Address, Buffer, (UInt32)Buffer.Length, out Zero);
}

and for integer

private void Write2(int Address, int Value)
{
byte[] Buffer = BitConverter.GetBytes(Value);
IntPtr Zero = IntPtr.Zero;
WriteProcessMemory(pHandel, (IntPtr)Address, Buffer, (UInt32)Buffer.Length, out Zero);
}

Why ?
That'd give you extra work .
You can have two functions with same name => they have different arguments(in first function value is integer, in second value is float).
Quote Originally Posted by Lovroman View Post

Why ?
That'd give you extra work .
You can have two functions with same name => they have different arguments(in first function value is integer, in second value is float).
oh yes okay so its both write but different arguments!

And how i add more offset like 5
Quote Originally Posted by _PuRe.LucK* View Post
oh yes okay so its both write but different arguments!

And how i add more offset like 5
IDK.
You can try to add more +0xOffset's
Code:
WriteInteger((ReadInteger(addy)+0x1+0x2),value)
..
I have never tried to use pointer with multiple offfsets.
Quote Originally Posted by Lovroman View Post
IDK.
You can try to add more +0xOffset's
Code:
WriteInteger((ReadInteger(addy)+0x1+0x2),value)
..
I have never tried to use pointer with multiple offfsets.
Or you do 0x1 + 0x2 in calculator and add these

---------- Post added at 01:07 PM ---------- Previous post was at 11:09 AM ----------

Quote Originally Posted by _PuRe.LucK* View Post
Or you do 0x1 + 0x2 in calculator and add these
Hey lovro can u accept me in skype please?
Posts 115 of 23 · Page 1 of 2

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?