By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,665 Members | 1,392 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,665 IT Pros & Developers. It's quick & easy.

VB.NET WebService to VB6 COM Object - Variant parameter

P: n/a
I have a VB6 COM object, "Project1.Class1", that takes in a variant by
reference.

Function COMObjectMethod(ByRef strVariable)
strVariable = "xyz"
End Function

In the .NET WebService if I add a reference to this COM object it works
fine. However, if I use late binding I get "Type mismatch".

'Dim strVar
'Dim strVar as string
'Dim strVar as Object
'Dim strVar as New Object
'Dim strVar as VariantType

obj = CreateObject("Project1.Class1")
Call obj.COMObjectMethod(strVar)

I have tried all the above declarations and all of them failed.

Any idea on how to do this?

Thanks,
Kumar
Nov 22 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.