We have a legacy VB6 application which has worked just fine on Windows XP Professional SP 3 until just recently when we added an IE frame control so that we could display static local HTML files on a form. And, it works fine until I go to close the application. And, then it reports the following error message (consistently):
Faulting module ntdll.dll, version 5.1.2600.5755, stamp 49901d48
Here's the reference in the Visual Basic project file:
Object={EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}#1.1#0; ieframe.dll
And we use it by performing the following action开发者_如何学运维s:
- Development machine is running Win7 + Vb6 IDE.
- Add a component reference to the "Microsoft Internet Controls" located at C:\Windows\SysWow64\ieframe.dll
- Place a control on the form at design time.
- Show that form modally by calling
The error happens when I use the default form instanceForm.Show vbModal
as well as when I use a local instancefrmMyForm.Show vbModal
Dim MyForm as New frmMyFormMyForm.Show vbModal
- Call WebBrowser.Navigate "staticPage.html"
- When the user presses a button, the button click event returns the user choice and the form is disposed of.
- Exit the application -- Here's where I get the error.
I've been looking all over the web, and haven't been able to find a whole lot of people still trying to use VB6 in this way. So, I'm wondering if someone might be able to help me on stackoverflow. Any help is much appreciated!
[Update] And, the plot thickens. I made a sample application with just that web component in order to make sure that it was causing the error. But, I didn’t experience the error when it closed like I was when exiting our existing/legacy vb6 application. I'll do a bit more investigating.
A follow up to this in case any runs into the same issue (the original poster and I were coworkers at the time)...
The application was using the VBCorLib library, and some of its string manipulation classes utilized direct memory access incorrectly. Read more at this VBCorLib forum post.
It turns out that the issue was that I was trying to delete the temporary file that the browser had loaded. It works now that I've moved that delete file code to the form unload event.
精彩评论