在< select>中选择一个项目时,在PowerBuilder应用程序内部使用WebBrowser控件时出错。标签 [英] Error using WebBrowser control inside PowerBuilder app when select an item in <select> tag

查看:207
本文介绍了在< select>中选择一个项目时,在PowerBuilder应用程序内部使用WebBrowser控件时出错。标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在PowerBuilder 11.5应用程序内的窗口中使用WebBrowser控件。在IE7和IE8上一切正常,但在Windows 7下的IE9中,当您在标记中选择一个项目时,应用程序崩溃。



在IE7和IE8中,我将应用程序添加到注册表中键FEATURE_USE_WINDOWEDSELECTCONTROL。在Windows 7的IE9中,64位做了相同的操作,如果与我的应用程序对应的REG_DWORD值为1,则应用程序崩溃。如果值为0,则应用程序不会崩溃,但无法使用鼠标选择项目。



分析错误和转储文件,mshtml.dll文件中会出现错误,并带有异常代码0xc0000005,包括:

  mshtml!CDOMMouseEvent :: PrepareEvent 

有什么想法吗?



更新:我的应用是开发的32位应用在Windows XP SP3中。



更新2 :异常代码为0xC0000005(我认为这是内存访问冲突。



更新3 :为寻找错误原因,我基于.NET WebBrowser控件在C#中开发了ActiveX控件,并用PB应用程序替换了Microsoft Web浏览器



使用windbg来分析转储文件,<它也只能在PB中崩溃,因为在WinForm应用程序(具有相同的WebBrowser)中,一切正常。 / p>

  FAULTING_IP:
mshtml!CDOMMouseEvent :: PrepareEvent + 39
62b40195 8b39 mov edi,dword ptr [ecx ]

EXCEPTION_RECORD:00185f70-(.exr 0x185f70)
异常地址:62b40195(mshtml!CDOMMouseEvent :: PrepareEvent + 0x00000039)
ExceptionCode:c0000005(访问冲突)
ExceptionFlags:00000000
NumberParameters:2
Parameter [0]:00000000
Parameter [1]:00000000
尝试从addres读取s 00000000

过程_名称:PB115.EXE
错误代码:(NTSTATUS)0xc0000005-注释 0x%08lx和 0x%08lx。没有备忘录%s。
EXCEPTION_CODE:(NTSTATUS)0xc0000005-引用 0x%08lx作为备忘录。没有备忘录%s。

EXCEPTION_CODE_STR:c0000005
EXCEPTION_PARAMETER1:00000000
EXCEPTION_PARAMETER2:00000000
READ_ADDRESS:00000000

FOLLOWUP_IP:
mshtml!CDOMMouseEvent: :PrepareEvent + 39
62b40195 8b39 mov edi,dword ptr [ecx]

WATSON_BKT_PROCVER:11.5.0.2506
WATSON_BKT_PROCSTAMP:489933bc
WATSON_BKT_MODULE:ms。 b WATSON_BKT_MODVER:9.0.8112.16446
WATSON_BKT_MODSTAMP:4fb58407
WATSON_BKT_MODOFFSET:230195
BUILD_VERSION_STRING:6.1.7601.17514(win7sp1_rtm.101119-1850)


PB11.5与Windows 7 64位+ IE9之间可能不兼容。



解决方案

设置此注册表值似乎是Internet Explorer 7( MS KB文章详细说明)。我的猜测是,由于根本原因在于Microsoft代码库,因此您唯一的选择是通过根据安装的IE版本切换该注册表值来解决该问题。您可以使用此CodeProject文章来帮助您确定。如果已安装IE7或IE8,则将该值设置为1,否则将其设置为0。



GL!


I'm using WebBrowser control in a window inside a PowerBuilder 11.5 application. Everything works fine on IE7 and IE8 but the application crashes in IE9 under Windows 7 when you select an item in a tag.

In IE7 and IE8 I added my application to registry key FEATURE_USE_WINDOWEDSELECTCONTROL. In IE9 under Windows 7 64bits did the same and if the REG_DWORD value that corresponds to my application is 1, the application crashes. If the value is 0, the application does not crashes but item selection with mouse is impossible.

Analyzing errors and dump file, error occurs in the mshtml.dll file with an exception code 0xc0000005, including:

mshtml!CDOMMouseEvent::PrepareEvent

Any ideas?.

Update: My app is a 32bit app developed in Windows XP SP3.

Update 2: Exception code is 0xC0000005 (I think it's a memory access violation.

Update 3: Seeking the reason for the error, I've developed an ActiveX control in C# based on the .NET WebBrowser control and I've replaced the Microsoft Web Browser of my PB app with the new one. It also crashes and only in PB, because in a WinForm application (with the same WebBrowser) everything works fine.

Using windbg to analyze dump file:

FAULTING_IP: 
mshtml!CDOMMouseEvent::PrepareEvent+39
62b40195 8b39            mov     edi,dword ptr [ecx]

EXCEPTION_RECORD:  00185f70 -- (.exr 0x185f70)
ExceptionAddress: 62b40195 (mshtml!CDOMMouseEvent::PrepareEvent+0x00000039)
   ExceptionCode: c0000005 (Access violation)
  ExceptionFlags: 00000000
NumberParameters: 2
   Parameter[0]: 00000000
   Parameter[1]: 00000000
Attempt to read from address 00000000

PROCESS_NAME:  PB115.EXE    
ERROR_CODE: (NTSTATUS) 0xc0000005 - La instrucci n en "0x%08lx" hace referencia a la memoria en "0x%08lx". La memoria no se puede "%s".    
EXCEPTION_CODE: (NTSTATUS) 0xc0000005 - La instrucci n en "0x%08lx" hace referencia a la memoria en "0x%08lx". La memoria no se puede "%s".

EXCEPTION_CODE_STR:  c0000005
EXCEPTION_PARAMETER1:  00000000
EXCEPTION_PARAMETER2:  00000000
READ_ADDRESS:  00000000 

FOLLOWUP_IP: 
mshtml!CDOMMouseEvent::PrepareEvent+39
62b40195 8b39            mov     edi,dword ptr [ecx]

WATSON_BKT_PROCVER:  11.5.0.2506
WATSON_BKT_PROCSTAMP:  489933bc
WATSON_BKT_MODULE:  mshtml.dll
WATSON_BKT_MODVER:  9.0.8112.16446
WATSON_BKT_MODSTAMP:  4fb58407
WATSON_BKT_MODOFFSET:  230195
BUILD_VERSION_STRING:  6.1.7601.17514 (win7sp1_rtm.101119-1850)

There may be some incompatibility between PB11.5 and Windows 7 64 bit + IE9?.

Thanks in advance.

解决方案

Setting this registry value appears to be a workaround for a bug in Internet Explorer 7 (MS KB Article, eHow Description). My guess is that since the root cause lies in the Microsoft codebase, your only option is to work around it by toggling that registry value according to which version of IE is installed. You can use this CodeProject article to help you determine that. If IE7 or IE8 is installed, set the value to 1, otherwise, set it to 0.

GL!

这篇关于在&lt; select&gt;中选择一个项目时,在PowerBuilder应用程序内部使用WebBrowser控件时出错。标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆