DTSearch COM Interop - 如何向 C# 公开对象?

发布于 2024-10-19 05:29:07 字数 399 浏览 2 评论 0原文

我知道,我这是在赌一把。我不知道在这件事上我是否能得到帮助。但是,问题就在这里。

我工作的公司拥有 DTSearch 的完全许可(如果是旧的)开发人员副本,包括 C++ 源代码。他们在我正在更新的应用程序中使用它。我被告知要在当前正在开发的此应用程序的 C# 附加功能中使用它。但是,我没有 .NET 程序集,而且他们出于某种原因拒绝实现它。

因此,我可以轻松地在对象浏览器中查看 dtengine,并且有很多可爱的对象等待我使用它们。但它们都不会实例化。尝试它让我

无法嵌入“dtengine.SearchJobClass”。请改用适用的接口。

而且接口有很多,我可以轻松实现其中任何一个。问题是,“抛出新的 NotImplementedException”并不能完全完成我的搜索。

有人有任何线索吗?

I know, I'm taking a gamble here. I don't know if I can even be helped on this one at all. But, here is the problem.

The company I work for has a fully licensed, if old, developer copy of DTSearch including the C++ source. They use this in an application I'm updating. I've been told to make use of it in the C# additions to this app that are currently being worked on. However, I don't have the .NET assembly and they refuse to implement it for some reason.

So, I can easily view dtengine in the Object Browser and there are lots of lovely objects waiting for me to use them. But none of them will instantiate. Attempting it gets me

'dtengine.SearchJobClass' cannot be embedded. Use the applicable interface instead.

And there are interfaces galore, I can easily implement any of them. Trouble is, "throw new NotImplementedException" doesn't exactly get my searching done.

Does anyone have any clues?

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

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

发布评论

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

评论(1

命比纸薄 2024-10-26 05:29:07

我使用了一些必须实例化的 COM 对象,如下所示:

Foo f = new FooClass();

Does the DTSearch hasimilar Looks class name?

我还相信 COM 接口很特殊,您可以通过它的接口实例化 COM 对象,尽管我很难找到好的示例。

我确实找到了这个:

http://www.codeproject.com/KB/COM/COMBasics。 请注意

,如果向下滚动,您会看到它们以特殊的方式实例化接口。我并不是说这是一个解决方案,但它可能有助于您研究如何在应用程序中使用 DTSearch COM 包装器。

I've used some COM objects that you have to instantiate like so:

Foo f = new FooClass();

Does the DTSearch have similar looking class names?

I also believe that COM interfaces are special and that you can instantiate a COM object by it's interface though I'm having a hard time finding good examples.

I did find this:

http://www.codeproject.com/KB/COM/COMBasics.aspx

note that if you scroll down you'll see them instantiating the Interface in a special way. I'm not saying this is a solution but it may help in your investigation of how to use the DTSearch COM wrapper in your application.

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