You are viewing limited content. For full access, please sign in.

Question

Question

Application error due to "No such interface supported"

asked on June 13, 2017

I decompiled an application that connects to the LF Client, runs a search query, and generates a report based on the results. Then I made a few changes that have nothing to do with this error, compiled, and tried to run it. I'm able to get as far as the query, but when I click the button to generate the report I get an error:

System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to interface type 'LFSO83Lib.LFFolder'. This operation failed because the QueryInterface call on the Com component for the interface with IID '{the ID number}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE))

 

The line with the error is

 

this.entry = (LFFolder) this.DB.GetEntryByGUID(((ILFEntry) ((ILFSearchHit) searchHits[index]).Entry).EntryGUID);

 

I've been searching around online for the past two days to no avail so I figured I would ask here. The machine running the application has LF Client 8.3. Upgrading is not going to happen. The LF dlls referenced by the project are:

 

Interop.LFClient.dll version 1.0.0.0

Interop.LFIMAGEENABLE80Lib.dll 8.0.0.0 (also tried 8.0.6.3)

LFSO83Lib.dll version 8.3.0.0 (also tried LFSO91Lib.dll version 9.1.0.0)

 

The machine running the application has the 9.2.1 SDK installed.

 

Thank you

0 0

Answer

SELECTED ANSWER
replied on June 21, 2017

Are you sure that "((ILFSearchHit) searchHits[index]).Entry" is a Folder?

1 0
replied on June 22, 2017

You know, that was actually the issue. I don't know if it's because the project was decompiled or something else, but I don't think it makes any sense to be searching for folders in that situation so I changed it to documents and now it works. Such a simple solution. Thank you!

0 0

Replies

replied on June 14, 2017

When you recompiled, did you set the compiler to x86?

0 0
replied on June 14, 2017

Yes, it gave a whole bunch of warnings about a mismatch until I compiled to x86.

0 0
replied on June 14, 2017 Show version history

When "this.entry" is defined, is it as a LFFolder or ILFEntry? And if you are after the searchhit entry, why call the entry to get the Guid to get the entry?  Just get the entry once like:

// If this.entry is defined as LFFolder
this.entry = (LFFolder) ((ILFSearchHit) searchHits[index]).Entry;
// if this.entry is defined as ILFEntry
this.entry = (ILFEntry) ((ILFSearchHit) searchHits[index]).Entry;

 

0 0
replied on June 15, 2017

this.entry is defined as an LFFolder. When running your line of code instead I get the same error.

0 0
replied on June 21, 2017

Does anyone have an idea about this?

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.