给自己的程序增加网页浏览功能
有很多文章介绍了怎样在自己的程序中加入浏览网页的功能,我也曾经用vb制作自己的浏览器。大多是利用了shdocvw.dll中的webbrowser控件和internet explorer automation。shdocvw.dll提供了com接口,使得程序员可以在自己的程序中使用webbrowser控件和internet explorer automation。它还提供了系列的internet api函数,给我们控制internet explorer。
如果大家想了解shdocvw.dll提供了些什么给我们,可以用《高级visual basic编程》(中国电力出版社)中type library editor工具浏览shdocvw.dll中的内幕。还可以用exescope这个资源编辑工具看看shdocvw.dll中有什么函数。
ie基本架构(摘自《程序员》专刊)
|
iexplorer.exe | |||
|
shdocvw.dll╟webbrowser control and internet explorer automation页面显示 | |||
|
mshtml.dll ╟ mshtml,处理页面的语法分析,又是一个com服务器,把html中的页面元素定义成对象,给客户端访问 | |||
|
html | |||
|
activex control |
activex script engine |
java applet |
plug in |