NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Appendix A - NGWS Runtime MIME Filter

This section describes the mechanics of how the NGWS runtime works with IE to actually perform the download. The primary component is a MIME filter developed by the Runtime team. This filter is packaged in a separate dll and is not shipped with IE5.

The filter is registered to handle the following MIME types:

When IE starts the download of code with one of these MIME types, the NGWS runtime MIME Filter gets inserted in the chain of filters called by IE.

The filter is responsible for the following tasks:

The following picture describes the overall architecture and the specific steps that are involved in activating runtime classes in IE5:

  1. As described above, the Mime filter is registered for ‘application/octet-stream’, ‘application/x-msdownload’, and ‘application/x-mscomplus’.
  2. The Mime filter looks at the bits coming down to determine if the file is a runtime PE file. It does this by looking at directory entry 14.
  3. If the file is not a runtime executable, the filter passes control onto the rest of the filter chain and code download happens as before.
  4. If the file is a runtime executable, the filter starts the runtime and passes it the information required for activation. This information includes the full URL specified in the CLSID attribute of the OBJECT tag, and the IBindCtx interface it can use to report progress. The Runtime must be present on the machine. IE does not know how to download and start the Runtime.
  5. At this point, the Runtime determines which domain the code will run in (starting a new one if necessary), loads the DLL described in the URL, and creates a class factory that can be used to create the actual objects.
  6. The Runtime gets the IBindStatusCallback out of IBindCtx and sets the resulting class factory in the call to IBindStatusCallback::OnObjectAvailable. This makes the Mime filter aware that the object has been created.
  7. The Mime filter then reports back to the download transaction that the download is complete.
  8. IE’s processing of the mime filter chain now stops and the class factory interface pointer is returned to Trident.
  9. Trident now uses the IP to create objects as it needs