Solved

Passing a dynamic array from VB to a C++ DLL as parameter

Posted on 2003-11-23
1
4,758 Views
Last Modified: 2007-12-19
in VB we can easily use dynamic arrays as parameter
example:
Function MyFunction(MyDynArray() as Long)
'called by
MyFunction MyDynArray


and then the array can be redimed and filled by the function

how can i do this in C++ ?
and is it possible to redim it as 2-dimensional array ?
0
Comment
Question by:ennixo
1 Comment
 
LVL 12

Accepted Solution

by:
vascov earned 100 total points
ID: 9828887
Hi ennixo,

Sorry for the delay. (been under water... :)

Have a look at this KB article. It explains what you want to achieve.

HOWTO: Pass Arrays Between Visual Basic and C
http://support.microsoft.com/support/kb/articles/Q207/9/31.asp&NoWebContent=1

Since VB arrays are under the covers SAFEARRAYs you can redim and manipulate this arrays at will. There are just some considerations regarding user defined types.

If you need a sample other than the one provided in the article let me know.

0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
haveThree challenge 22 121
what is the main difference between git clone and fetch ann pull and push commands 2 101
Not needed 13 118
Interview question Javascript, database 12 81
If you haven’t already, I encourage you to read the first article (http://www.experts-exchange.com/articles/18680/An-Introduction-to-R-Programming-and-R-Studio.html) in my series to gain a basic foundation of R and R Studio.  You will also find the …
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…

792 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question