|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
QueryInterface Failed for InteropWe 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? Show quote "JNaes" <JN***@discussions.microsoft.com> wrote in message news:BD2B68BB-BD82-4B3B-B59C-2B1F73A72A98@microsoft.com... > 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. 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. Show quote "Dmytro Lapshyn [MVP]" wrote: > Hi, > > Have you re-registered all the COM DLLs on the new server with regsvr32.exe? > > "JNaes" <JN***@discussions.microsoft.com> wrote in message > news:BD2B68BB-BD82-4B3B-B59C-2B1F73A72A98@microsoft.com... > > 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. > > > |
|||||||||||||||||||||||