3

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?

dogged
  • 33
  • 4
  • Did you figure out an answer to your problem? – Frank Hale Mar 08 '11 at 20:47
  • I don't know how old your version is, but current versions of dtsearch come with a dotnet wrapper. Perhaps you should convince them to upgrade. – mosheb Mar 16 '11 at 20:44
  • I failed at convincing them to upgrade. – dogged May 04 '11 at 11:08
  • @Frank-Hale Eventually, I managed to implement a blank C# service with a C++ implementation layer behind it using code extracted from previous attempts - dated 2003 according to comments - to use the dtSearch engine. This had a number of handicaps and I was forced to rely on trial and error to narrow down the required parameters and produce anything resembling accurate results - wildcards in an index search were a nightmare! I'm still not happy with the final result but it is at least functional. – dogged May 04 '11 at 11:11

1 Answers1

0

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.

Frank Hale
  • 1,886
  • 1
  • 17
  • 31