Error using WebBrowser control inside PowerBuilder app when select an item in
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:
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:
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.