Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Queryinterface failed
Message
From
14/03/2002 09:31:50
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Queryinterface failed
Miscellaneous
Thread ID:
00632709
Message ID:
00632709
Views:
38
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.
Reply
Map
View

Click here to load this message in the networking platform