471,570 Members | 934 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,570 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 1737
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by John | last post: by
8 posts views Thread by Steve Schroeder | last post: by
6 posts views Thread by André | last post: by
2 posts views Thread by John Kotuby | last post: by
reply views Thread by leo001 | last post: by
reply views Thread by lumer26 | last post: by
reply views Thread by Vinnie | last post: by
reply views Thread by lumer26 | last post: by

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.