Catching page fault

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • > Adrian

    #1

    Catching page fault

    How can I catch an "invalid page fault".
    Could you please give example code?
    Many thanks.
    Adrian.


  • Peter Duniho

    #2
    Re: Catching page fault

    On Wed, 25 Jul 2007 02:19:03 -0700, Adrian < <x@xx.xxwrote :
    How can I catch an "invalid page fault".
    Could you please give example code?
    It's not clear what you mean. In the context of C# and .NET, there's no
    such thing. There is a NullReferenceEx ception, which you can catch just
    like any other exception. But because of garbage collection and the
    inability to assign arbitrary values to reference variables in C# (at
    least without "unsafe" code...maybe you can do it in "unsafe" code), you
    wouldn't get other kinds of invalid references.

    Pete

    Comment

    • > Adrian

      #3
      Re: Catching page fault


      "Peter Duniho" <NpOeStPeAdM@nn owslpianmk.comw rote in message
      news:op.tv1duxd s8jd0ej@petes-computer.local. ..
      On Wed, 25 Jul 2007 02:19:03 -0700, Adrian < <x@xx.xxwrote :
      >
      How can I catch an "invalid page fault".
      Could you please give example code?
      >
      It's not clear what you mean. In the context of C# and .NET, there's no
      such thing. There is a NullReferenceEx ception, which you can catch just
      like any other exception. But because of garbage collection and the
      inability to assign arbitrary values to reference variables in C# (at
      least without "unsafe" code...maybe you can do it in "unsafe" code), you
      wouldn't get other kinds of invalid references.
      >
      Pete
      Please have a look at this reference:

      I want to protect against that happening or create a way out by means of a
      catch and a message.

      Adrian


      Comment

      • Peter Duniho

        #4
        Re: Catching page fault

        On Thu, 26 Jul 2007 01:03:53 -0700, Adrian < <x@xx.xxwrote :
        Please have a look at this reference:
        http://support.microsoft.com/kb/305652
        I still don't understand. That reference discusses a particular fault
        that happens with a specific piece of software when a computer is
        rebooted. It's not something that would be related to your C# code at all.

        Are you getting this same fault from within your own C# program? If so,
        how do you do that, given that the fault you're referring to appears to be
        specific to boot time after installating a particular program.

        If not, I think you need to be more specific about what scenario it is you
        have and how you want to handle it.

        Pete

        Comment

        Working...