Solved

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

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
countXY challenge 28 153
no14 challenge 14 69
ShiftLeft challenge 21 82
linearIn  challenge 23 107
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…
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

810 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