Purnima
March 31st, 1999, 04:38 AM
Hi,
Is there any way by which I could trap the GPFerror messages through VB
code?
Please help me find this out.
Any suggestion would be appreciated?
Any reading material / web site / book?????????
Thanks in anticipation.
Regards,
Purnima
purnima@boi.co.in
Chris Eastwood
March 31st, 1999, 05:44 AM
Hi
Unfortunately, there is no way of trapping a GPF in VB (just like in any other programming language). These are usually caused by references to memory that isn't there anymore, or references to memory out of scope by that object.
I spent an age trying to track down a GPF in one of our applications, it turned out that a UserControl was keeping a reference to an Object that had been passed into it - UserControl_Terminate cannot always be relied upon to clear down the references, hence the application would keep an invalid reference count and eventually go belly-up.
I've got the Numega Developement tools installed on my machine here, they do a pretty good job of tracking down errors such as this. There's also supposed to be some very strong error trapping (I don't know whether it would handle this kind of error though).
If you're feeling really brave, you can switch off all compiler options, and generate debugging symbolic code in VB which will allow you to trace the application in the Visual Studio debugger - not for the faint of heart though.
Good Luck
Chris Eastwood
CodeGuru - the website for developers
http://www.codeguru.com/vb