iwebbrowser2

how do i login to gmail via internet explorer using iwebbrowser 2

is it possible to login to sites like facebook,gmail using iwebbrowser2? in the code below what can i add so that it can login to gmail(with ie8 as browser) using the username and password i put in a variable? MyBrowser := CreateOleObject('InternetExplorer.Application') as IWebBrowser2; MyBrowser.Navigate('http://mysite.com'.............

not enough actual parameters ?

The following program returns error : e2035 not enough actual parameters in 2 places (lines 39 and 45) and is not compiling. Can someone please help me out? Can I put 0 or null in place of parameters here? unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs,ComObj,shdocvw,a...

IWebBrowser2: how to force links to open in new window?

The MSDN documentation on WebBrowser Customization explains how to prevent new windows from being opened and how to cancel navigation. In my case, my application is hosting an IWebBrowser2 but I don't want the user to navigate to new pages within my app. Instead, I'd like to open all links in a new IE window. The desired behavior is: use...

Disable script debugging in IWebBrowser2 OLE control? C++

I have a IWebBrowser2 I use to visit some webpages with .Navigate() When the page has a js error I got a warning box for "Syntax error", so I used .put_Silent(TRUE). And now I get a warning for "VS Just-In-Time Debugger: Unhandled exception" instead How can I disable all the script error warnings (including JIT debugger) from my code (i...

How can I create a WebBrowser control (ActiveX / IWebBrowser2) without a UI?

I cannot figure out how to use the WebBrowser control without having it create a window in the taskbar. I am using the IWebBrowser2 ActiveX control directly because I need to use some of the advanced features like blocking downloading JAVA/ActiveX/images etc. That apparently is not available in the WPF or winforms WebBrowser wrappers (b...

How can I get an IWebBrowser2 reference to the Internet Explorer window opened by clicking on a link?

Suppose I open a new Internet Explorer window by, for example, clicking a link with target="_blank" in the HTML link. Further suppose I'm doing so programmatically via COM. I realize I can attach to the DWebBrowserEvents2::NewWindow3 event, and be notified when a new window will be opened. How do I get a reference to that newly opened wi...

Canceling all existing HTTP requests in Internet Explorer/IWebbrowser

I'm automating an Internet Explorer window using the IWebBrowser API. Is there a way to cancel all outstanding HTTP requests in IE/IWebbrowser? I've tried the following and none of them work. Calling IWebBrowser::Stop(). This only cancels navigation and does not stop existing downloads from continuing. Navigating to 'about:blank'. ...

IWebBrowser2 HTTP response headers

I have the same question that Dragos asked here "...Hi! I'm developing an application which hosts an web browser control. I'm getting access to it through IWebBrowser2 interface. Is there any way to have access programatically to the responses header..." The solution (from 2003) seems to be using an passthrough Asynchronous Pluggable...

C++ COM design. Composition vs multiple inheritance

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...

C++ IWebBrowser2 - IE - Access Image Cache

Hello, I am currently automating some requests with the IWebBrowserApp Object. Now I want to save an image, that is NOT saved in Cache (due to http headers). Also I can not just download it from the image url, not even when using a second IWebBrowserApp Object and getting the response as stream (html code, or server errors to prevent dow...

IHTMLDocument2->open not working as expected from within activex control

Hi folks. Unfortunately I'm a complete novice when it comes to this kind of native windows programming. I have been tasked with attempting to figure this out within our group alas. Essentially I need an activex control to open a new browser window. In addition to this I would like to have a reference to the new windows hwnd when its done...

How to get my IHttpNegotiate implementation called by IWebBrowser??

Hi! I use cwebpage_src code and I need to update some HTTP request headers while clicking on links. As I understand it can be done with self implementation of IHttpNegotiate->BeginTransaction. But how to get my IHttpNegotiate implementation called?? Thanks! ...

What is IInternetProtocol->Start default implementation?

I have IInternetProtocol->Start method called and want to change HTTP request headers in there, but the rest of default implementation should be the same. ...

IWebBrowser2 interfaces dependency graph

Is there interfaces dependency graph for IWebBrowser2 component? I just want to make it clear what kind of dependencies exist between interfaces and who calls who? ...

IWebBrowser2 and multithreaded apartment?

Hi all, I am developing a Windows app with WebBrowser control (IWebBrowser2) embedded. Things look good if I initialize COM apartment as single threaded: CoInitialize(NULL); However, if I change it to be multithreaded: CoInitializeEx(NULL, COINIT_MULTITHREADED); then it starts to fail all over the places with return value of: ...

Calling C++ function from JavaScript script running in a web browser control

I have embedded a web browser control in my c++ application. I want javascript running in the web browser control to be able to call a c++ function/method. I have found mentions of three ways to do this: Implement an ActiveX component that acts as a middle man. (Implementation details here: http://blogs.msdn.com/b/nicd/archive/2007/04...

Returning string to JavaScript from C++ function

I have a class (JSObject) that implements the IDispatch interface. The class is exposed to JavaScript running in my hosted web browser control (IWebBrowser2). See more here about how this works: http://stackoverflow.com/questions/3747414/calling-c-function-from-javascript-script-running-in-a-web-browser-control I can call in to JSObjec...

How do I create a low-integrity instance of Internet Explorer using CoCreateInstance?

From a standard, non-elevated, medium-integrity process, I need to create an instance of Internet Explorer 7 on Windows Vista, and I need to use CoCreateInstance to do it. I've tried using techniques like those outlined in this thread, but I've been having some challenges. I'm able to lower a thread's integrity level, and use CoCreateIns...

Can IWebBrowser2 store cookies in a user specified folder?

I am working on a small web browser on c++ using IWebBrowser2, the problem is that when I delete cookies on my browser, they get deleted for IE, and I dont want to interfere with IE cookies. Is there a way to solve this? ...

IWebBrowser2 and cookies in IE

Hi, We use IWebBrowser2 to display web pages but it seems to not able to see the same cookies as normal IE sees. For example, if I log in Facebook in IE and check on Remember Me, the next time I open IE and go to Facebook then I will still stay logged in. However, if I use IWebBrowser2 to go to Facebook, I am not logged in anymore. I...