QueryInterface Failed for Interop

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

We needed to call some old DLL programs in .NET code. In order to do so, we
had to create a COM DLL in VB6 as a wrapper to the old DLLs. We then used
tlbimp.exe to create an Interop DLL for use within .NET. We created a .NET
Web service to call the COM DLL via the Interop DLL. Everything worked fine.

Then, we ported the code to a new server. We are now getting the following
error message: "System.InvalidCastException: QueryInterface for interface
Interop.Connectware._Connectware failed...".

Everything seems to be the same between the two servers, except the new
server has been updated to .NET Framework 2.0, while the old server has .NET
Framework 1.1.

Has anyone encountered this and know of the fix?

Thanks.
 
Hi,

Have you re-registered all the COM DLLs on the new server with regsvr32.exe?
 
Yes, they have all been re-registered. The COM code works from the new
server. Its just the Interop interface to .NET that does not seem to be
working.
 
Back
Top