Page 1 of 2 12 LastLast
Results 1 to 15 of 23
  1. #1
    I'm not lazy, I just really enjoy doing nothing.
    Donator
    _PuRe.LucK*'s Avatar
    Join Date
    Apr 2013
    Gender
    male
    Location
    idk bruh.
    Posts
    521
    Reputation
    71
    Thanks
    5,185
    My Mood
    Bored

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

    How to use Pointer + Offset in C#?

    Question in title ^_^

  2. #2
    Lovroman's Avatar
    Join Date
    Sep 2012
    Gender
    male
    Posts
    9,430
    Reputation
    611
    Thanks
    9,714
    My Mood
    Cheerful
    Quote Originally Posted by Nik0815 View Post
    How to use Pointer + Offset in C#?

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

    Code:
    WriteFloat(ReadInteger(0x12345678) + 0xC), 15);

  3. The Following User Says Thank You to Lovroman For This Useful Post:

    _PuRe.LucK* (06-15-2013)

  4. #3
    Threadstarter
    I'm not lazy, I just really enjoy doing nothing.
    Donator
    _PuRe.LucK*'s Avatar
    Join Date
    Apr 2013
    Gender
    male
    Location
    idk bruh.
    Posts
    521
    Reputation
    71
    Thanks
    5,185
    My Mood
    Bored
    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?
    Last edited by _PuRe.LucK*; 06-15-2013 at 10:20 AM.

  5. #4
    Lovroman's Avatar
    Join Date
    Sep 2012
    Gender
    male
    Posts
    9,430
    Reputation
    611
    Thanks
    9,714
    My Mood
    Cheerful
    Quote Originally Posted by Nik0815 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

  6. The Following User Says Thank You to Lovroman For This Useful Post:

    _PuRe.LucK* (06-15-2013)

  7. #5
    Threadstarter
    I'm not lazy, I just really enjoy doing nothing.
    Donator
    _PuRe.LucK*'s Avatar
    Join Date
    Apr 2013
    Gender
    male
    Location
    idk bruh.
    Posts
    521
    Reputation
    71
    Thanks
    5,185
    My Mood
    Bored
    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

  8. #6
    Lovroman's Avatar
    Join Date
    Sep 2012
    Gender
    male
    Posts
    9,430
    Reputation
    611
    Thanks
    9,714
    My Mood
    Cheerful
    Quote Originally Posted by Nik0815 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);
            }

  9. #7
    Threadstarter
    I'm not lazy, I just really enjoy doing nothing.
    Donator
    _PuRe.LucK*'s Avatar
    Join Date
    Apr 2013
    Gender
    male
    Location
    idk bruh.
    Posts
    521
    Reputation
    71
    Thanks
    5,185
    My Mood
    Bored
    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

  10. The Following User Says Thank You to _PuRe.LucK* For This Useful Post:

    Lovroman (06-15-2013)

  11. #8
    Lovroman's Avatar
    Join Date
    Sep 2012
    Gender
    male
    Posts
    9,430
    Reputation
    611
    Thanks
    9,714
    My Mood
    Cheerful
    Quote Originally Posted by Nik0815 View Post
    Oh thanks guy
    I'll give u credits
    You don't have to, but do it if you want .No problem.

  12. The Following User Says Thank You to Lovroman For This Useful Post:

    _PuRe.LucK* (06-15-2013)

  13. #9
    Threadstarter
    I'm not lazy, I just really enjoy doing nothing.
    Donator
    _PuRe.LucK*'s Avatar
    Join Date
    Apr 2013
    Gender
    male
    Location
    idk bruh.
    Posts
    521
    Reputation
    71
    Thanks
    5,185
    My Mood
    Bored
    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

  14. #10
    Lovroman's Avatar
    Join Date
    Sep 2012
    Gender
    male
    Posts
    9,430
    Reputation
    611
    Thanks
    9,714
    My Mood
    Cheerful
    Quote Originally Posted by Nik0815 View Post
    I must give you credits
    OK !
    Don't forget, this is just example using Float pointer, pointers aren't always float .

  15. #11
    Threadstarter
    I'm not lazy, I just really enjoy doing nothing.
    Donator
    _PuRe.LucK*'s Avatar
    Join Date
    Apr 2013
    Gender
    male
    Location
    idk bruh.
    Posts
    521
    Reputation
    71
    Thanks
    5,185
    My Mood
    Bored
    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);
    }

  16. #12
    Lovroman's Avatar
    Join Date
    Sep 2012
    Gender
    male
    Posts
    9,430
    Reputation
    611
    Thanks
    9,714
    My Mood
    Cheerful
    Quote Originally Posted by Nik0815 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).

  17. #13
    Threadstarter
    I'm not lazy, I just really enjoy doing nothing.
    Donator
    _PuRe.LucK*'s Avatar
    Join Date
    Apr 2013
    Gender
    male
    Location
    idk bruh.
    Posts
    521
    Reputation
    71
    Thanks
    5,185
    My Mood
    Bored
    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

  18. #14
    Lovroman's Avatar
    Join Date
    Sep 2012
    Gender
    male
    Posts
    9,430
    Reputation
    611
    Thanks
    9,714
    My Mood
    Cheerful
    Quote Originally Posted by Nik0815 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.

  19. The Following User Says Thank You to Lovroman For This Useful Post:

    _PuRe.LucK* (06-15-2013)

  20. #15
    Threadstarter
    I'm not lazy, I just really enjoy doing nothing.
    Donator
    _PuRe.LucK*'s Avatar
    Join Date
    Apr 2013
    Gender
    male
    Location
    idk bruh.
    Posts
    521
    Reputation
    71
    Thanks
    5,185
    My Mood
    Bored
    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 Nik0815 View Post
    Or you do 0x1 + 0x2 in calculator and add these
    Hey lovro can u accept me in skype please?

Page 1 of 2 12 LastLast

Similar Threads

  1. [Help] How to use Pointer + Offset in C#?
    By _PuRe.LucK* in forum C# Programming
    Replies: 10
    Last Post: 06-16-2013, 06:41 AM
  2. How to use pointer from CheatEngine in C#
    By pakistanihaider in forum Call of Duty Modern Warfare 3 Coding, Programming & Source Code
    Replies: 24
    Last Post: 08-06-2012, 03:15 PM
  3. question how to use
    By hyptonix in forum Combat Arms Help
    Replies: 2
    Last Post: 09-13-2009, 12:00 AM
  4. Replies: 5
    Last Post: 07-22-2009, 05:26 PM
  5. [Question] how to use all adresses
    By niekill in forum WarRock - International Hacks
    Replies: 7
    Last Post: 12-14-2007, 08:40 AM