473,320 Members | 1,969 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

VB.NET WebService to VB6 COM Object - Variant parameter

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
0 935

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: C. N. Sridhar | last post by:
Hi, I'm writing a wrapper to a win32 dll in C#. I need to call a method in DLL which has a Variant type reference parameter. How to marshal variant type from win32 (unmanaged code) to C#...
0
by: Kumar Thiagarajan | last post by:
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...
2
by: Dave | last post by:
I wish to call a COM Object which has a parameter of type VARIANT* on a method call from C# The COM Method :- STDMETHODIMP CClassType::GetTypeIDs(VARIANT * TypeIDs) {...
5
by: Pete Hearn | last post by:
Hello All, New to the whole C#/Webservice/ADO.NET thing, so apologies in advance if this is a daft question! I have a webservice which returns a dataset - no problem there and all very...
7
by: stephan querengaesser | last post by:
hi ng, i try to invoke a webservice-method with an filter-object, that contains value types. if i don´t want to filter the return value of the method, i have to pass a new instance of the...
0
by: Kumar Thiagarajan | last post by:
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...
5
by: David++ | last post by:
Hi folks, I would be interested to hear peoples views on whether or not 'pass by reference' is allowed when using a Web Service method. The thing that troubles me about pass-by-reference into...
4
by: MarkusJNZ | last post by:
Hi, I am trying to pass an number from a classic asp webpage to a .NET webservice. Because my C# webservice expects an integer and classic ASP uses variants I keep getting problems with object...
4
by: =?Utf-8?B?QmlsbEF0V29yaw==?= | last post by:
Hi, We recently converted a 1.1 project to 2.0 and this included a webservice which accepted XML for one of the parameters. Since converting to 2.0 I am getting the following message: --- A...
4
by: Jonathan | last post by:
I have a SQL stored procedure for adding a new record in a transactions table. It also has two return values: CounterID and IDKey. I want to create a webservice that accepts the 10 input...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.