Solved

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

Posted on 2003-11-23
1
4,755 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Laravel Forge - What is it? (But in non-developer language:) ) 3 75
equalIsNot  challenge 43 132
either24  challenge 19 90
bunnyEars challenge 6 98
Having just graduated from college and entered the workforce, I don’t find myself always using the tools and programs I grew accustomed to over the past four years. However, there is one program I continually find myself reverting back to…R.   So …
The purpose of this article is to demonstrate how we can use conditional statements using Python.
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.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

930 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now