Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Queryinterface failed
Message
De
14/03/2002 09:31:50
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Queryinterface failed
Divers
Thread ID:
00632709
Message ID:
00632709
Vues:
39
I created the following in vfp7 ..

Created a new project called comobj.
Added a classlib called classone.
Added a class based on custom called comobjone.
Marked class as olepublic.
Build multithreaded dll called comobj.dll


In Visual Studio.net ...

Created an asp web application.
Added label1, textbox1, and button1 to webform1.
Right clicked on reference and added comobj type library from the com tab.


In the button1.click sub routine (VB) I added the following.

Dim otestobj As New comobj.comobjone()
Dim mystring As String
mystring = otestobj.getstring()


When I run this form and click on button1, I get the error:

QueryInterface for interface comobj.Icomobjone failed.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidCastException: QueryInterface for interface comobj.Icomobjone failed.


Anybody see what I'm doing wrong? This is my first attempt to call a com object from a .net form, so it's probably something simple.

Thanks.
Répondre
Fil
Voir

Click here to load this message in the networking platform