URL Moniker Examples for C# (IMoniker)

2.6k Views Asked by At

I am trying to implement an URL Moniker for MSHTML that will be used to provide images from a storage (in the application) to the HTML Edit control. I have understood that to do this I must implement the IMoniker interface.

I have not found any decent documentation or sample code anywhere for this. (All MSDN documentation on the subject seem to imply C++/COM programming and very deep understanding of OLE, which I can't say that I have).

How would I implement an URL Moniker and the IMoniker interface in C#?

2

There are 2 best solutions below

0
On

My solution to the problem (except it exposes text resources) is a COM object (built in C++), that can be called from .NET to achieve the same result

This is where I put it (UrlFeeders)

2
On

I could not find a single IMoniker implementation in .net on the web, but there used to be a sample called ETCPROT (Google for ETCPROT.EXE) that was the best starting point to write asynchronous protocol (but in C++).

If you can track down the sample and translate it to C# kudos to you, but I would stick with the file:// protocol.