iwebbrowser2

How to bypass Internet Explorer Enhanced Security when using embedded WebBrowser control?

[亡魂溺海] 提交于 2021-02-18 11:47:06
问题 i have a native Windows application that embeds the WebBrowser , i.e. CLSID_WebBrowser 8856F961-340A-11D0-A96B-00C04FD705A2 Shell.Explorer.2 Unfortunately, when running on Windows Servers, the Internet Explorer Enhanced Security mode interferes with the WebBrowser control, causing it to not render at all: In this case, the UI of the software is driven as a WebBrowser control - making the software unusable. i could disable Internet Explorer Enhanced Security mode, but that is not practical.

iWebBrowser::Navigate Deadlock after a ole32.dll exception

回眸只為那壹抹淺笑 提交于 2020-01-25 20:52:11
问题 I have a question related to windows embedded browser and COM. What I am trying to do is to display some data to the user in a HTML form so I use the iwebbrowser2 control to achieve this. I have this weird deadlock or hang in my application after a call to iwebbrowser2 Navigate is made after a ole32.dll crash. This ole32 crash randomly happens in my application. There is not a usual place or time in which the exception happens. It could happen right in the beginning on the application

Overriding window.location on Webbrowser Control

吃可爱长大的小学妹 提交于 2019-12-24 04:32:19
问题 This might seem a weird question, but is there a way to override the window.location without making the browser control navigate to it? The problem I am having is that i am injecting html code in the control, and the window.location is about:blank - causing errors on some javascript code. Trying to make them think they are in a URL other than about:blank 回答1: I've had success with Object.defineProperty() when document.documentMode >= 9 (IE9+). To get the WebBrowser control in IE9+ mode, I

Allow popups in WPF WebBrowser

血红的双手。 提交于 2019-12-24 04:01:49
问题 Is there a way to allow popups within embedded WPF WebBrowser control? I didn't manage to find someone elses solution, nor COM interface which enables allowing popups. I wouldn't like to change users registry settings or use similar invasive methods, as application is intended to be distributed through ClickOnce. 回答1: You can implement custom popups by handling NewWindow2 or NewWindow3 events sourced by the underlying WebBrowser ActiveX control. Below is a very basic example of how to do this

C++ COM design. Composition vs multiple inheritance

佐手、 提交于 2019-12-23 13:03:05
问题 I'm trying to embed a browser control in my application (IWebBrowser2). I need to implement IDispatch, IDocHostShowUI, IDocHostUIHandler etc to make this work. I am doing this in pure C++/Win32 api. I'm not using ATL, MFC or any other framework. I have a main class, called TWebf, that creates a Win32 window to put the browser control in and makes all the OLE calls needed to make it work. It's also used for controlling the browser control, with methods like Refresh(), Back(), Forward() etc.

Sinking DWebBrowserEvents2 events appears to hang programmatic navigation

六眼飞鱼酱① 提交于 2019-12-23 05:29:31
问题 I posted this question on the MSDN forums, but my experience has been a better quality of answer here on Stack Overflow, so I'm posting here as well. As I've posted several times before, I'm working on a browser automation framework, automating Internet Explorer from an external process. My architecture is as follows: I have a server which opens a named pipe that my automation client pushes commands to. The server interprets the commands, and executes them on the IWebBrowser2 object, which I

Specify User Agent for WPF WebBrowser Control

﹥>﹥吖頭↗ 提交于 2019-12-23 04:11:54
问题 I need to alter the default User Agent used by the WPF WebBrowser control. I have looked at the properties of the IWebBrowser2 object behind the control, and tried specifying the user agent by specifying it when calling "Navigate" as Suggested Here Is this possible? 回答1: The solution could be like the following Changing the UserAgent of the WebBrowser control -Winforms C# 回答2: URLMkSetSessionOption. http://blogs.msdn.com/b/ieinternals/archive/2009/10/08/extending-the-user-agent-string

Specify User Agent for WPF WebBrowser Control

ⅰ亾dé卋堺 提交于 2019-12-23 04:10:29
问题 I need to alter the default User Agent used by the WPF WebBrowser control. I have looked at the properties of the IWebBrowser2 object behind the control, and tried specifying the user agent by specifying it when calling "Navigate" as Suggested Here Is this possible? 回答1: The solution could be like the following Changing the UserAgent of the WebBrowser control -Winforms C# 回答2: URLMkSetSessionOption. http://blogs.msdn.com/b/ieinternals/archive/2009/10/08/extending-the-user-agent-string

How do I render the scrollable regions of a canvas with IViewObject::Draw?

浪尽此生 提交于 2019-12-22 10:43:55
问题 I've been trying to render the entire canvas in an IWebBrowser2 control to a bitmap. IViewObject::Draw seems to be the most promising approach, but I can't get it to render anything that would requires a scroll to show. While I could automate the scrolling and stitch the images together, this would look weird with any fixed position elements. Is this even doable? Additionally, I've tried to set the controller's size to one that would allow the entire contents to display without needing to

How to Cleanly Destroy WebBrowser Control

*爱你&永不变心* 提交于 2019-12-20 10:55:49
问题 I am using ATL in VisualC++10 to host browser control. My code is similar to this example: http://msdn.microsoft.com/en-us/library/9d0714y1(v=vs.80).aspx Difference is I have main window and then child window hosts the browser control. After 2 minutes i have to close the browser completely kill the browser activeX but this child window should be alive and do something else. But somehow this browser control still stays there, i can either see scrollbars or something.. I have also tried by