Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Exception handler for STATUS_GUARD_PAGE exception.

Reply
Thread Tools

Exception handler for STATUS_GUARD_PAGE exception.

 
 
Todd A. Anderson
Guest
Posts: n/a
 
      11-03-2004
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


 
Reply With Quote
 
 
 
 
Jack Klein
Guest
Posts: n/a
 
      11-03-2004
On Tue, 2 Nov 2004 18:03:42 -0800, "Todd A. Anderson"
<0SPAM> wrote in comp.lang.c++:

> 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
news:comp.os.ms-windows.win32.programmer or one of Microsoft's support
groups in the news:microsoft.public.vc.* family. It is not a C++
language issue.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Exception of type 'System.Web.HttpUnhandledException' wasthrown.Exception has been thrown by the target of an invocation.System.WebSystem.Exception jobs ASP .Net 1 11-16-2007 05:57 PM
How does a handler render the request to another handler in the MVC of SPRING 2.0.1 framework? rayzyang@gmail.com Java 0 05-30-2007 11:28 AM
while executing my client program i get the exception javax.naming.LinkException: [Root exception is javax.naming.LinkException: [Root exception is javax.naming.NameNotFoundException: remaining if plz anybody know how to solve this problem then mahesh Java 0 03-08-2007 12:26 PM
Event Handler that creates adds another event handler kaczmar2@gmail.com ASP .Net 1 02-22-2007 07:37 AM
how do u invoke Tag b's Tag Handler from within Tag a's tag Handler? shruds Java 1 01-27-2006 03:00 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57