Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Please Help with Webservice/Interop Problem !!!

0 views
Skip to first unread message

Joe Longo

unread,
Apr 30, 2003, 1:44:31 PM4/30/03
to
I have a VB6 dll, a simple class:

Public Property Get test() As String

End Property

Public Property Let test(ByVal vNewValue As String)

End Property

I have VB DotNet running on Windows XP.

Refrencing the dll with a dot net webservice fails:
I get the error "QueryInterface for interface Project2._Class1 failed."

The locals window shows:
test <error: an exception of type: {System.InvalidCastException} occurred>
String
for the obj as the local, property test

Try
Dim obj As Project2.Class1
obj = New Project2.Class1Class()
Dim sz As String
sz = obj.test <<<<<Failure occurs here
obj.test = "XX"
MyTest = "Success"
sz = User.Identity.Name()
Catch e As Exception
MyTest = e.Message
End Try
End Function

Referencing the dll with a dot net console app works:

Sub Main()
Try
Dim obj As Project2.Class1
obj = New Project2.Class1Class()
Dim sz As String
sz = obj.test
obj.test = "XX"
Console.WriteLine("Success")
Catch e As Exception
Console.WriteLine(e.Message)
Finally
Console.Read()
End Try
End Sub

Is this a windows xp/IIS security issue. Can anyone explain what is going
on. What is the workaround ?


0 new messages