K
Kurt Richardson
Hi all
Sorry to bother you with what is probably a really
trivial question for you C++ experts. My programming
skill are pretty amateur, but I'm pretty good at VB.NET.
However, I'm wanting to realise some of the speed
benefits of writing some of my routines in C++ and
accessing them from my VB software.
I have managed to do this with a few simple routines in
which variables are passed... no arrays.
However, I am currently working on a routine that
requires that I pass an array to the C++ DLL and then
back again to the main VB program (I actually want to
pass several arrays, but I only want to manipulate one of
them). The C++ routine needs to dynamically resize the
array to sizes that can only be decided during runtime.
In VB this is simply done with ReDim Preserve, but my C++
Bible (Horton's Beginning Visual C++) seems to indicate
that I need to use pointers, duplication, etc. and even
if I get that to work how will VB know that the array has
been resized?
Any assistance is much appreciated - though please keep
your answers at the 'dummies guide' level
Thanks, Kurt
Sorry to bother you with what is probably a really
trivial question for you C++ experts. My programming
skill are pretty amateur, but I'm pretty good at VB.NET.
However, I'm wanting to realise some of the speed
benefits of writing some of my routines in C++ and
accessing them from my VB software.
I have managed to do this with a few simple routines in
which variables are passed... no arrays.
However, I am currently working on a routine that
requires that I pass an array to the C++ DLL and then
back again to the main VB program (I actually want to
pass several arrays, but I only want to manipulate one of
them). The C++ routine needs to dynamically resize the
array to sizes that can only be decided during runtime.
In VB this is simply done with ReDim Preserve, but my C++
Bible (Horton's Beginning Visual C++) seems to indicate
that I need to use pointers, duplication, etc. and even
if I get that to work how will VB know that the array has
been resized?
Any assistance is much appreciated - though please keep
your answers at the 'dummies guide' level
Thanks, Kurt