C# 的 URL 名字对象示例 (IMoniker)

发布于 2024-08-06 19:36:25 字数 241 浏览 2 评论 0原文

我正在尝试为 MSHTML 实现一个 URL Moniker,它将用于将图像从存储(在应用程序中)提供到 HTML 编辑控件。我知道要做到这一点,我必须实现 IMoniker 接口。

我还没有在任何地方找到任何合适的文档或示例代码。 (关于该主题的所有 MSDN 文档似乎都暗示着 C++/COM 编程和对 OLE 的非常深入的理解,但我不能说我已经了解了)。

如何在 C# 中实现 URL Moniker 和 IMoniker 接口?

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#?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

瞎闹 2024-08-13 19:36:25

我在网络上的 .net 中找不到单个 IMoniker 实现,但曾经有一个名为 ETCPROT(Google for ETCPROT.EXE)的示例,它是编写异步协议的最佳起点(但是在 C++ 中)。

如果您能找到该示例并将其转换为 C#,我会很高兴,但我会坚持使用 file:// 协议。

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.

心房敞 2024-08-13 19:36:25

我对这个问题的解决方案(除了公开文本资源)是一个 COM 对象(用 C++ 构建),可以从 .NET 调用它来实现相同的结果

这是我放置它的位置 (UrlFeeders)

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)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文