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.
"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
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.
Comment