473,396 Members | 2,070 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,396 software developers and data experts.

Exception handler for STATUS_GUARD_PAGE exception.

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
Jul 22 '05 #1
1 2136
On Tue, 2 Nov 2004 18:03:42 -0800, "Todd A. Anderson"
<dr****@aaahawk.com.N0SPAM> 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
Jul 22 '05 #2

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

Similar topics

5
by: juergen perlinger | last post by:
Hello out there. sometimes I need to have proper control of the floating point arithmetic of the C(and C++) runtime system, and using the f.p. exception handling of the C99 standard is quite...
9
by: David B | last post by:
Why is it so difficult to report bugs to Microsoft? I have a documented bug and an small test example. I don't really see why I should have to pay to tell them about it... Anyway, the...
44
by: craig | last post by:
I am wondering if there are some best practices for determining a strategy for using try/catch blocks within an application. My current thoughts are: 1. The code the initiates any high-level...
40
by: Kevin Yu | last post by:
is it a bad programming design to throw exception in the try block then catch it??
2
by: | last post by:
I would appreciate some help in understanding the simple C# example relating to handling exceptions. This one relates to catching an error thrown by dividing number by zero. There are a few...
2
by: Seth | last post by:
Ok, here is my setup. I have a fully functioning HTTP Handler implemented. The handler is supposed to handle every single request that comes in to a particular virtual directory. Thus, in IIS, I...
2
by: Nak | last post by:
Hi there, I'm just curious as to something. I have just added an exception handler at the entry point to my application, within the IDE any unhandled exceptions fallback to this and enable me...
11
by: chopsnsauce | last post by:
Here's the example: Dim frm As New FORM1 Try frm.show Catch ex As Exception msgbox ex.message
6
by: Steve | last post by:
Hi All I have a windows forms Application (SAM) in vb.net 2008 using .net framework V2 One and only one customer out of 30 customers is getting errors daily where they have to close and...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.