SAMPLE: MIMEfilt Demonstrates MIME Filter for Internet Explorer (260840)



The information in this article applies to:

  • Microsoft Internet Explorer (Programming) 5
  • Microsoft Internet Explorer (Programming) 5.01
  • Microsoft Internet Explorer (Programming) 5.5

This article was previously published under Q260840

SUMMARY

MIMEfilt.exe is a sample Multipurpose Internet Mail Extensions (MIME) filter for Internet Explorer that converts incoming XML data into very simple HTML. This sample demonstrates how you can build a simple COM object that filters data of a particular MIME type before it is passed to the client of a URL moniker, such as Internet Explorer.

MORE INFORMATION

The following file is available for download from the Microsoft Download Center:
Release Date: Jan. 3, 2001

For additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base:

119591 How to Obtain Microsoft Support Files from Online Services

Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help to prevent any unauthorized changes to the file.

Using MIMEfilt

To use MIMEfilt, build the enclosed sample files in Microsoft Visual C++ 6.0 or later. After the build has automatically self-registered the object, any navigation to XML data in Internet Explorer will invoke the sample and convert the XML to HTML.

NOTE: This sample will override the default XML MIME viewer that is built into Internet Explorer. To restore the default XML MIME viewer when you are done with this sample, be sure to unregister the XMLMIMEfilter.dll file. You can do this by using Regsvr32:

regsvr32 /u xmlmimefilter.dll

Design

MIMEfilt is divided into two main classes, CXMLMimeFilterPP and CStringDataBuffer.

CXMLMimeFilterPP is a simple Active Template Library (ATL)-based COM object that implements the two main MIME filter interfaces discussed in this section.

CStringDataBuffer is used by CXMLMimeFilterPP to store the data as it is read from the incoming protocol handler and converted by the MIME filter. CStringDataBuffer stores written strings in a linked-list of blocks that are coalesced when a client asks for data through ReadData. This simplifies the buffer handling and data conversion that CXMLMimeFilterPP needs to do.

REFERENCES

The documentation on pluggable protocols is currently located on the MSDN Online Web Workshop at:

Modification Type:MinorLast Reviewed:8/9/2004
Keywords:kbdownload kbfile kbSample kbURLMon KB260840 kbAudDeveloper