Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8081519
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T16:45:11+00:00 2026-06-05T16:45:11+00:00

I am using a readprocessmemory class and have got it to work for reading

  • 0

I am using a readprocessmemory class and have got it to work for reading through multilevel pointers and displaying the integer at the final address in label2.text.

This works where I specify the base address, (shown as “0x40000” below):

private void label2_Click(object sender, EventArgs e)
    {
        int Readpointer = Trainer.ReadPointerInteger("runningprocess", 0x40000, new int[3] { 0x3, 0x4, 0x10 });
        string converted = Readpointer.ToString();
        label2.Text = converted;

Now instead of specifying the base address “40000”, I wanted to use a function to ‘find out’ the base address of the process and store it in a variable and pass that as a paramater instead. This does the first part:

        Process[] test = Process.GetProcessesByName("runningprocess"); //Get process base address
        int Base = test[0].MainModule.BaseAddress.ToInt32(); // ""

Unfortunately, the "Trainer.ReadPointerInteger" function requires the baseaddress paramater in the form “0x40000”. So I did this:

        string BaseAddress = "0x" + Addr.ToHex(Base); // addr.ToHex is just another function which converts the int to hex.

Now at the point I want to pass the variable to ReadPointerInteger's second paramater, and I tried this:

        int Readpointer = Trainer.ReadPointerInteger("runningprocess", BaseAddress, new int[3] { 0x3, 0x4, 0x10 });
        string converted = Readpointer.ToString();
        label2.Text = converted;

It looks like this should work, but the problem (error) is that the second parameter of the ‘Trainer’ function is an Int, which to my newbie eyes is weird as it isn’t intuitive to me to have an input parameter which includes letters as an Int. Anyway, I am stuck here, and wonder if someone could point out how to get around the Int/String problem?

FYI, the ReadPointerInteger class is:

public static int ReadPointerInteger(string EXENAME, int Pointer, int[] Offset)
{
    int Value = 0;
    checked
    {
        try
        {
            Process[] Proc = Process.GetProcessesByName(EXENAME);
            if (Proc.Length != 0)
            {
                int Bytes = 0;
                int Handle = OpenProcess(PROCESS_ALL_ACCESS, 0, Proc[0].Id);
                if (Handle != 0)
                {
                    foreach (int i in Offset)
                    {
                        ReadProcessMemoryInteger((int)Handle, Pointer, ref Pointer, 4, ref Bytes);
                        Pointer += i;
                    }
                    ReadProcessMemoryInteger((int)Handle, Pointer, ref Value, 4, ref Bytes);
                    CloseHandle(Handle);
                }
            }
        }
        catch
        { }
    }
    return Value;
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T16:45:12+00:00Added an answer on June 5, 2026 at 4:45 pm

    0x40000 is just another name for the integer 262144. It’s not a string with “0x” in it, it’s an alternative syntax for writing integers, for use when base 16 is more enlightening than base 10. In particular, the following cannot be true:

    the “Trainer.ReadPointerInteger” function requires the baseaddress parameter in the form “0x40000”.

    It’s just that addresses are usually written in hex.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using boost python I need create nested namespace. Assume I have following cpp class
I tried using both ReadProcessMemory() and WriteProcessMemory() in my application,but in both cases I
Using Java,I have to fetch multiple sets of values from an XML file to
Using MVVM. I have a DataTemplate which I am using to display an expander
using chrome and ff so far have made a nasty glitch when using scrollTo
When using ReadProcessMemory to read memory of an executable file, the first two bytes
I am using ReadProcessMemory in C# output is bytes[] . I want to covert
Using android 2.3.3, I have a background Service which has a socket connection. There's
Using MVC2 I have an AJAX form which is posting to a bound model.
Using Core Data, I have a fetch request to fetch the minimum of a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.