开发者

VB6 IE frame / WebBrowser causing NT.dll error

开发者 https://www.devze.com 2023-01-18 07:09 出处:网络
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

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:

  1. Development machine is running Win7 + Vb6 IDE.
  2. Add a component reference to the "Microsoft Internet Controls" located at C:\Windows\SysWow64\ieframe.dll
  3. Place a control on the form at design time.
  4. Show that form modally by calling
    Form.Show vbModal
    The error happens when I use the default form instance
    frmMyForm.Show vbModal
    as well as when I use a local instance
    Dim MyForm as New frmMyForm

    MyForm.Show vbModal

  5. Call WebBrowser.Navigate "staticPage.html"
  6. When the user presses a button, the button click event returns the user choice and the form is disposed of.
  7. 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消