views:

27

answers:

0

Hello all. I've been having trouble with VB6, of late. I'm receiving heap corruption errors on closing the legacy VB6 application that we maintain.

What I see, when I close the app, is that there was an error during run-time which, for whatever reason, didn't get reported during run-time (as we do have a pretty standard error handling code) and that error report and summery needs to be sent off to Microsoft for support and diagnostic reasons.

When I review the application event log, I notice that it mentions that there has been an error in the .NET runtime 2.0 (at least I think that's what it was, as I'm quoting the event message from memory while commuting). VB6, to my knowledge, doesn't use the .NET framework at all, unless a developer has exposed it via COM Interop. And, we have done that, to some extent, but that code was and still seems to be stable. These errors became more frequent after we started using a "Microsoft Internet Controls"/ieframe.dll > Web Browser component to display local static web content.

And, after searching online for a bit this morning, I've learned that this error in the event log is an indication that the heap has been corruption, most likely due to (what others describe as) "bad code", whatever that means.

Now, for my question. How to track down heap corruption errors in unmanaged code (C/C++/VB6) specifically in a WinXP Pro/Windows environment?