473,327 Members | 2,025 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,327 software developers and data experts.

C#-App: Passing a string-array byref to a ActiveX Vb6-dll

Hi!
I'm using Type.InvokeMember() to call functions in an ActiveX Dll written in Vb6 from C#. The function I need to call have several String-arrays as arguments and these act as out-parameters. It looks like this:
Sub TheFunction(Number as Integer, StringArray() As String, StringArray2() As String)

I put in a number and two empty string-arrays. The function resizes and fills these string-arrays with data and I'm supposed to get this data into my C#-application.
My question may be devided into two questions:

1. How do you pass a C# (string)array to an ActiveX Dll?
2. How do you pass an argument (an array) by reference to an ActiveX Dll from C#?

(I must use late-binding because the dll will be changed quite often and rebuilding the source app(s) everytime isn't an option)

Thanks!
/David
Nov 27 '07 #1
0 1323

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Goncalo | last post by:
Hi. Can you tell me what's the difference between ByVal and ByRef in VB.Net. I'm asking this 'cause i'm passing an object into a function ByVal, then I change that object and when the...
2
by: Bob Hanson | last post by:
Hello, I first have a working embedded ActiveX control in a HTML page that has PARAM NAME statements in it. I am looking for help on how to pass these parameter strings to the HTML page...
14
by: Robin Tucker | last post by:
Although I've been working on this project for 8 months now, I'm still not sure of the difference between ByVal and ByRef. As most objects in VB are reference types, passing ByVal I've discovered...
2
by: Neil Munro | last post by:
I'm having some "type" difficulty in passing a .NET array (byref) to a COM based API (Autodesk Inventor). In VB6 the code to return an array of tolerance values is: Dim ToleranceCount As Long...
0
by: martin_saucier | last post by:
I have a problem where when passing object ByRef in a WebService, some object members are being return as Nothing when coming back from the call ? How do I fix this ? Thanks. Martin
2
by: SQLScott | last post by:
I know that passing variables "ByRef" to a web web service is permitted, but what I am expreriencing is quite odd. If I take out my ByRef parameter from the method of my web service, i can step...
4
by: Jason Taylor | last post by:
Hello, I have created a Web service with the following web method; <WebMethod()> _ Public Function HelloWorld(ByVal myMemoryStream As System.IO.MemoryStream) As String Return "Hello World"...
0
by: Lucy Ludmiller | last post by:
I am writing an ActiveX control wrapper for my C++ library. I would like to know how to return a C++ object in an event raised by the ActiveX control. For e.g: FireEvent(CMyObject) // <- How...
4
by: Scott M. | last post by:
Does C# support passing arguments ByVal & ByRef? If so, what is the default (ByVal?)? And, if so, how do you explicitly specify either? Thanks.
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
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...
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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.