Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2003-11-23
1
Medium Priority
?
4,766 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 12

Accepted Solution

by:
vascov earned 400 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Navigation is an important part of web design from a usability perspective. But it is often a pain when it comes to a developer’s perspective. By navigation, it often means menuing. This is less theory and more practical of how to get a specific gro…
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 …
This video teaches viewers about errors in exception handling.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

715 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