473,326 Members | 2,655 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Triggering event on change in process memory?

I'm using ReadProcessMemory from kernel32.dll to read specific bytes
from the process memory of a program. While the solution I have now
(which updates the memory content at regular intervals) works, I can
help thinking that it's a waste of resources. It also possible to miss
changes if the interval is set too long.

I'm a newbie when it comes to eventhandlers, and I guess I could
benefit from learning-by-doing on somewhat less complex examples, but I
thought I'd ask if this is the way to go in my situation, lest I waste
my time. Also, some pointers would be greatly appreciated! :)

Regards,
Mike

Dec 5 '05 #1
2 1794
Mike,

I don't know if there is anything that would let you do this... And if
so, doing so is really not a solid way of determining whether or not there
are changes in a program.

Is there any way that you can get an event to fire when what you are
looking at changes? It's a much better way of handling this.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"anguish" <an*****@tjohoo.se> wrote in message
news:11*********************@g47g2000cwa.googlegro ups.com...
I'm using ReadProcessMemory from kernel32.dll to read specific bytes
from the process memory of a program. While the solution I have now
(which updates the memory content at regular intervals) works, I can
help thinking that it's a waste of resources. It also possible to miss
changes if the interval is set too long.

I'm a newbie when it comes to eventhandlers, and I guess I could
benefit from learning-by-doing on somewhat less complex examples, but I
thought I'd ask if this is the way to go in my situation, lest I waste
my time. Also, some pointers would be greatly appreciated! :)

Regards,
Mike

Dec 5 '05 #2

"anguish" <an*****@tjohoo.se> wrote in message
news:11*********************@g47g2000cwa.googlegro ups.com...
I'm using ReadProcessMemory from kernel32.dll to read specific bytes
from the process memory of a program. While the solution I have now
(which updates the memory content at regular intervals) works, I can
help thinking that it's a waste of resources. It also possible to miss
changes if the interval is set too long.

I'm a newbie when it comes to eventhandlers, and I guess I could
benefit from learning-by-doing on somewhat less complex examples, but I
thought I'd ask if this is the way to go in my situation, lest I waste
my time. Also, some pointers would be greatly appreciated! :)

Regards,
Mike


We need some more context about what you are trying to achieve, and why you
are using low level debugging API's from managed code.
But supposing you are reading another process memory, then the other process
must signal an event when writing is done, for instance by means of a
semaphore. The reading process could wait on the semaphore to get signaled.

Willy.

Dec 5 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: T | last post by:
How do you catch the "Exited" event when a process is terminated. In the following code sample the "myProcess_Exited" event is never called. Any help would be appreciated. using System; using...
13
by: aundro | last post by:
Hello, I've been looking on the web for a solution to this problem: I create a set of checkboxes, and 2 buttons: - one is labeled "All" - the other is labeled "None" Clicking "All" is...
1
by: Wavemaker | last post by:
I was wondering if there is a way to change the value of a control without triggering an event. The ComboBox control, for example, will trigger the SelectedIndexChanged event when its SelectedIndex...
3
by: John | last post by:
Hi On my webform, in design mode when I double click on the button component, it creates a click sub for me. But when I add code to the click event and run the web form the code does not seem to...
8
by: Steve Schroeder | last post by:
For some reason I cannot get the OnSelectedIndexChanged event to fire for a listbox I have on a page. I'm able to populate the listbox with data from a stored procedure, but cannot trigger the...
6
by: André | last post by:
Hi, I’m using win server 2003 and IIS 6.0, C# 1.1 When I check in my Event View under system, I see this Information Log: A worker process with process id of 'xxx' serving application pool...
2
by: John Kotuby | last post by:
Hi guys, I am converting a rather complicated database driven Web application from classic ASP to ASP.NET 2.0 using VB 2005 as the programming language. The original ASP application works quite...
1
by: raddrummer | last post by:
OK this is a total newbie question but.....I have a field in a subform that I want to use to trigger an event on change(). I'm debugging and am trying to get a message box to fire on change (just to...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.