Exception handler for STATUS_GUARD_PAGE exception.

  • Thread starter Todd A. Anderson
  • Start date
T

Todd A. Anderson

Hi,

I want to call VirtualProtect with the PAGE_GUARD flag to cause
subsequent
accesses to certain regions of memory to generate the STATUS_GUARD_PAGE
exception. When this exception happens, I want to record some information
and
then have the operation that caused the fault retry the operation (which
should succeed
because the PAGE_GUARD flag is removed by the exception process). I want to
write the handler just once but if I put it in Main() then when the
exception happens
the stack will unwind all the way back to Main(). Whatever happened to the
old style
where you could insert yourself into a list of exception handlers and you
would return
to the point where you left off after you had processed the exception? It
has been
a while since I've had to do this and I can't seem to find it in the
documentation as it is
full of structured exception handling.

I'm currently working in VC++ 6 if that matters.

thanks,

Todd
 
J

Jack Klein

Hi,

I want to call VirtualProtect with the PAGE_GUARD flag to cause
subsequent
accesses to certain regions of memory to generate the STATUS_GUARD_PAGE
exception. When this exception happens, I want to record some information
and
then have the operation that caused the fault retry the operation (which
should succeed
because the PAGE_GUARD flag is removed by the exception process). I want to
write the handler just once but if I put it in Main() then when the
exception happens
the stack will unwind all the way back to Main(). Whatever happened to the
old style
where you could insert yourself into a list of exception handlers and you
would return
to the point where you left off after you had processed the exception? It
has been
a while since I've had to do this and I can't seem to find it in the
documentation as it is
full of structured exception handling.

I'm currently working in VC++ 6 if that matters.

thanks,

Todd

None of "VirtualProtect", "PAGE_GUARD", or "STATUS_PAGE_GUARD" are
defined by or are part of the topic here, the standard C++ language.
Based on your reference to Visual C++, I gather that they are Windows
API things, not discussed here.

You need to ask in a group like
or one of Microsoft's support
groups in the family. It is not a C++
language issue.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,754
Messages
2,569,528
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top