Solved

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

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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Problem with Pie chart in Jsp 20 180
Setup specific permissions in Microsoft Access 9 56
centeredAverage challenge 8 120
array6 challenfge 6 62
Windows Script Host (WSH) has been part of Windows since Windows NT4. Windows Script Host provides architecture for building dynamic scripts that consist of a core object model, scripting hosts, and scripting engines. The key components of Window…
This article will show, step by step, how to integrate R code into a R Sweave document
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…

707 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

13 Experts available now in Live!

Get 1:1 Help Now