⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 page1.htm

📁 利用MimeFilter实现网页过滤。IE7下不能使用
💻 HTM
字号:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
<title>Page 1</title>
<style>@import url(coUA.css);</style>


</head>

<body bgcolor="#FEFEF2" topmargin="10" leftmargin="10">
<p><img src="pnh.gif" align="left" border="0"> </p>
<p><img src="hhwani.gif" align="right" border="0" width="60" height="60"> </p>



<h5 class="overH">&nbsp;</h5>


      <p align="left">&nbsp;</p>
  <A HREF="page2.htm">See Source code</A>
    <p align="left">&nbsp;</p>
    <p align="left">&nbsp;</p>
      <p align="left">This demo demonstrates some of the powerful features in a
      temporary or permanent pluggable namespacehandler.</p>
      <p align="center">In a url the namespace is the &quot;servername&quot;: <font size="1"><b><br>
      http://&lt;NAMESPACE&gt;/index.html</b></font> </p>
      <p align="left">After implementing your namespacehandler you take the
      control when the webbrowser-application or IE is navigating to a URL
      containing the selected namespace.</p>
      <p align="left">You can choose between implementing a <i> temporary</i> or
      a <i>permanent</i> pluggable namespacehandler. <br>
      <br>
      A <b>temporary</b> namespacehandler is only active in the application
      where it&nbsp; is registered. At any time you can unregister the NS-handler.
      There is no DLL-files or writing to registry. If you want to use temporary
      pluggable namespacehandler in IE, you can implement it in a Browser Helper
      Object.</p>
      <p align="left">A <b>permanent</b> pluggable namespacehandler is active
      for all applications and urlmonikers using the registered protocol and namespace.
      Create it in a DLL and register it. Notice the following bug report from
      MS:</p>
      <p align="left"><a href="http://support.microsoft.com/support/kb/articles/Q190/8/93.ASP"><font size="1">http://support.microsoft.com/support/kb/articles/Q190/8/93.ASP</font></a></p>
      <p align="left">When the webbrowser-control (or IE) navigates to a URL
      containing the chosen namespace, URLMON sends the URL-adress to your
      namespacehandler and expects that you return some data to send to the
      webbrowser. URLMON does not care what data you return or where you
      get it from. The baseurl for the data you return is the URL sent to your
      namespacehandler. </p>
      <p align="left">In the following demo we use a namespacehandler to load
      webpages (including images, CSS, etc.) directly from a paradox-database.
      Structured storage files could have been used, or Wininet-functions could
      have been used to download data from the internet. It is up to you how
      you get the data.</p>
      <p align="left">Use IInternetSession.RegisterNameSpace to register the
      temporary pluggable namespacehandler:</p>
      <p align="left"><font size="2"><b>procedure</b> TForm1.FormCreate(Sender: TObject);<br>
      <b>begin<br>
      </b>  CoGetClassObject(Class_OurNSHandler, CLSCTX_SERVER, nil, IClassFactory, Factory);<br>
  CoInternetGetSession(0, InternetSession, 0);<br>
  InternetSession.RegisterNameSpace(Factory, Class_OurNSHandler, 'http', 0, nil, 0);<br>
      <b>end;<br>
      </b></font></p>
      <p align="left">According to the documentation it should have been
      possible to add namespace-patterns to RegisterNameSpace, but I have not
      been able to make this work. It don't matter much in temporary pluggable
      namespacehandler since we check for our namespace in Function Start and
      return to default protocolhandler if the namespace is not found in the
      incoming URL.</p>
      <p><font color="#000000" size="3">
      Enjoy!</font>
      <p align="left">&nbsp;</p>
      <p align="left">&nbsp;</p>
<CENTER><A HREF="http://www.euromind.com/iedelphi">IE & Delphi</A></CENTER>
      <p align="left">&nbsp;</p>


</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -