IWebBrowser and IWebBrowserApp

How do I use the IWebBrowser and IWebBrowserApp objects in ActiveX and what files need to be included (header-files) and in the path (dlls and so on)?
Who is Participating?
Answers2000Connect With a Mentor Commented:
1. DLL is SHDOCVW.DLL it lives in your Windows\System directory when you install Internet Explorer.  
You should not distribute this DLL with your app, but really on IE being installed.  If you want you can distribute the whole of IE with your app.  (This is Microsoft's license terms, visit their site for more info).
is a good place to start from for IE distribution stuff

2. Header is EXDISP.H in your VC\INCLUDE directory.  Some additional GUIDs are defined in  SHLGUID.H in your VC\INCLUDE directory.

That's it.  Obvious you need to include normal Windows/COM stuff you use as well into your project.

"but really on IE being installed"
should be
"but rely on IE being installed
Murali Devarakonda4WeekStartup.guruCommented:
Check out the section "Reusing Browser Technology" at

for details on how to use the IWebBrowser, IWebBrowser2, and IWebBrowserApp interfaces.
IWebBrowser and IWebBrowser2 interfaces belong to the WebBrowser ActiveX control (shdocvw.dll). For a new app, you should not use the older IWebBrowser interface. The IWebBrowserApp interface is the Automation interface that lets you control a separate instance of the Internet Explorer.

Murali Krishna Devarakonda
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

mdolandAuthor Commented:
mdolandAuthor Commented:
What do you mean with 'separate instance' ?

Murali Devarakonda4WeekStartup.guruCommented:
It's OLE Automation. It means that you will have an Internet
Explorer browser running WHICH YOU CAN CONTROL- using the
methods and events of the IWebBrowserApp Interface.

Take a look at the June 1998 issue of Microsoft Interactive
Developer (MIND) at www.microsoft.com/mind for an article(and a
freely downloadable sample program) that demonstrates both these

BTW, not that I care much about the points, but more as a
question of following a correct protocol, I have a question for
you: Do you realize at least now that you were hasty in
accepting an answer to your question, considering the questions
you're asking AFTERWARDS? It's obvious that the accepted answer
didn't really address the 'essence' of your question, which was
to find out the differences between the IWebBrowser and
IWebBrowserApp interfaces how to use them, while my answer
clearly did.

This happens all too often at EE- people not giving credit where
it's due, but I don't know of many instances where you accept
one person's answer over other's, and then ask followup
questions from the other.

FYI, although EE doesn't yet have a system in place to split
points (which BTW would have been the right thing to do in this
case), in future you can do it by asking Linda to do it by
sending her mail at linda@experts-exchange.com

At least on three occasions (I can give you proof if you insist)
in the last one month or so, I've found my answer- although correct- not accepted perhaps because people didn't know about splitting points, or didn't care or thought that they had the right answer, and then realized that they didn't.

This is a strong dis-incentive to post answers to questions that are 'locked'. The first person to posted a response as an 'answer' locks it, and then you get to accept or reject it, or ask followup questions from all the people who responded, AND THEN assign points to the answer that satisfies you the most, or split points if necessary.

Although in this case, Answers2000 did answer part of your question correctly when he locked it, I often find that someone just 'locks' a question to beat the buzzer without any valid answer.
Speaking for myself, I don't see why I should bother with 'locked' questions because of all the problems I've discussed above. But inspite of everything, the answer is simple. For the same reason I post answers all over the public newsgroups: because I can, because I care, and because I've gained as much- if not more- than I've helped by the whole exchange of information.

Murali Krishna Devarakonda

p.s.: Answers2000, please don't take this personally. I have a
lot of respect for you, and absolutely wasn't talking about you
at all in my rantings. I can personally attest to the fact that
you DO NOT engage is 'unethical locking'- you posted comments to
one of my questions, but didn't lock it as an answer!

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.