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 6130517
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:52:03+00:00 2026-05-23T16:52:03+00:00

I am reading memory from other running process which source code I don’t have

  • 0

I am reading memory from other running process which source code I don’t have by using

[DllImport("kernel32.dll")]
public static extern int ReadProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, [In, Out] byte[] buffer, uint size, out IntPtr lpNumberOfBytesRead);

and everything works fine. I get the value I need, but now I want to implement something like INotifyPropertyChanged in my program, so when value in that unmanaged process changes, that my code registers it and updates my variable X.

So far I have

private string x;
public string X { get { return x; } }
....
Threading.Timer timerX = new Timer(x => UpdateX(), null, 0, 500)
....
private void UpdateX()
{
    //Read value from unmanaged process
    OnPropertyChanged("X");
}

which updates X by reading that unmanaged process memory every 500ms, but that feels like hacking. Also, memory in unmanaged process can change few times in 500ms or once in few minutes, so putting a less interval seems like overkill. Is there more elegant solution. Thanks.

  • 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-05-23T16:52:04+00:00Added an answer on May 23, 2026 at 4:52 pm

    No, there is no way to get a notification when memory in another process changes. If you were a debugger, you could use a CPU data breakpoint to hear about changes in a small set of places. But this would have a significant perf impact, and is only the right approach if you are actually debugging.

    If the other process is something you own, then the best approach would be to disassemble and understand the code for other process, and add code of your own to send a notification. Working without source and making a small change is probably less hard than you think it is.

    Martyn

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

Sidebar

Related Questions

I have just been getting into low level programming (reading/writing to memory that sort
I recall reading somewhere that using references to smart pointers can cause memory corruption.
When using the Stream.BeginRead Method, and you are reading from a stream into a
I have two process and a shared memory zone, my workflow is like this.
I have a multithreaded C++ application which holds a complex data structure in memory
I am reading some C++ text and got the following code: From that code,
Given input, which shows tag assignments to images, as follows (reading this from php://stdin
We have inherited a legacy system for reading to and from meter guns. This
I have been developing a GUI for reading continuous data from a serial port.
We have an application running on Weblogic 8.1.3, using the bundled 1.4.2 JDK, and

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.