Chris,
Doing this is a little complicated. What you have to do is implement
the IMoniker interface exposed through COM. Fortunately, this is exposed
through the System.Runtime.InteropServices namespace through the
UCOMIMoniker interface.
When implementing, there are really only two methods you have to worry
about. The first is GetDisplayName. You will want to implement this so
that it returns the base url that the resource is coming from. For your
HTML page, it might not matter, but if you have a stream you saved from some
other site, and still want the links to point to the other site when you put
this content in the browser, then this is where you have to return the
original URL it was downloaded from.
The second method you have to implement is BindToStorage. For MSHTML,
this method is going to be called requesting an IStream implementation (you
can ignore the others). You will have to implement the IStream interface
and then return that. The IStream implementation will have to just call the
methods on the Stream instance that you want to read from.
Once you have that, you then have to get the IPersistMoniker interface
that MSHTML.HTMLDocument implements. You can then call Load on that
interface, passing in your implementation of UCOMIMoniker, and it will get
the data from your stream.
Hope this helps.