Introduction
With the development and popularization of the network, the network monitoring is becoming an inevitable requirement of network security, and also an effective means of managing and maintaining the network. At present, there are a variety of applications more extensive network monitoring and filtering procedures, such as the United States Ping Network management, We-blocker, and so on, they can be based on the network URL and IP address monitoring and filtering functions.
This article will introduce how to develop a monitoring program embedded in IE browser, which can monitor and filter according to the network URL and IP address, and record the system log so that you have a glance at all the operations of IE (of course, the user using it). I believe that by reading this article, you will deepen your understanding of the network monitoring program, as well as improve your COM programming capabilities and database programming capabilities.
This article is implemented in the Delphi 6 development environment, the database uses the Desktop database Access 2000.
Basic knowledge
1.COM programming
COM (Component object model) is a binary communication specification, presented by Microsoft Company, for interoperability across multiple processes, machines, hardware, and operating systems between software components, which is an interface ( Interface) transparently delivers encapsulated data technology, and is independent of language and operating platforms. A COM object is an object that implements one or more interfaces, that is, a COM object outputting the services it provides with the help of an interface.
Architecture of 2.IE Browsers
The architecture of IE browsers is shown in Figure 1. Where mshtml is a COM object that is located between SHDocVw and HTML pages, the SHDOCVW object is used to process the display of the page, MSHTML is used to process the parsing of the page, and the markup in the page is converted to an element. MSHTML is a COM server that allows COM client programs to access the services it provides externally.
The basic method to realize the embedded programming of IE browser is to establish COM objects so as to establish a connection with the MSHTML COM server in the form of COM client program, and then to realize the required control function through the interface callback. It is also the first to establish a COM object, to implement a number of interfaces specified by the system, and then register the COM object, and write the information about the COM object to the registry location specified by the IE browser extension feature.
Implementation of embedded IE Browser monitor program