Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Interop / December 2004

Tip: Looking for answers? Try searching our database.

QueryInterface for interface xxx._yyy failed

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bo Gusman - 16 Dec 2004 00:26 GMT
We just released the beta of version 7 of our VB6 based app. We have
documented how to write a VB.Net addin to extend our functionality and
it works just fine using the version 6 release.

One of our beta sites who has written and is selling a .Net addin for
the v6 tried to make his very same dll work with our beta 7, but it
failed with a "QueryInterface for interface xxx._yyy failed" error. I
can recreate the error here in the plant.

To complicate things, the beta site was sent a copy of the upgraded app
compiled without binary compatibility being set, and we thought that
might be the problem since the .Net DLL has a reference the original app
(for access to data class definitions used in the DLL). However,
recompiling the DLL with a reference to the correct executable (with
comptability set to the v6 app) and the problem still appears.

Any clues?

TIA!

    Bo
Henk de Koning - 16 Dec 2004 10:01 GMT
Usually this is not caused by your application code, but by the RCW. Or
better by the proxy the RCW holds on to.

When this is the case, you probably have an issue with typelib registration.
For VB6 (COM) components remoting is exclusively done using the typelib
marshaler. For that to succeed it'll need to know your typelib. If the
typelib is not registered, only the standard COM interfaces will remote. For
anything else, you'll see an E_NOINTERFACE.

Also, if you need a proxy, you need remoting, which (barring COM+ and
contexts) means your .net counterpart has acquired an incompatible threading
model. You can check by looking at the ApartmentState for the managed thread.
That should say STA in your case. If it doesn't, it is probably time for a
STAThread attribute ...

> We just released the beta of version 7 of our VB6 based app. We have
> documented how to write a VB.Net addin to extend our functionality and
[quoted text clipped - 17 lines]
>
>      Bo

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.