anhldbk
anhldbk

Reputation: 4587

Monitoring a virtual memory area (Win32)

Is there any Win32 API function for monitoring a particular area in a program's virtual memory. For example, a notification message's spawn if there's a read/write operation upon the area.

Upvotes: 2

Views: 787

Answers (2)

Necrolis
Necrolis

Reputation: 26171

You want to use guard pages along with VirtualQuery (probably in a loop) for monitory memory regions, for code sections you'd need to use HW or SW (INT3) breakpoints, this requires writing a small, mini-debugger, such as this tutorial shows.

Upvotes: 5

paulcam
paulcam

Reputation: 904

I think the only way you can do this is through the debugger api.

Upvotes: 1

Related Questions