Hello,
First off, this is my first C++ project and as usual I have bit off more than I can chew, but that's my style of learning.
Is there any way to pass an array from VB6 to a C++ DLL function? If not is there any way to pass a value that can be used to dimension an array in the function?
I can pass the double values to the function but I cannot create an array to load them into because I have no const value with which to size an array. The DLL works just fine if I hard code the data in the program. When compared to the complexity of the DLL this issue leaves me feeling like I'm Stuck on Stupid. I have included the section of code below.
Thanks in advance for any help.
Ron Becker
/* The Array: Point_2 is a Type. */
Point_2 pts[]={Point_2(2.5849,-1.1012),
Point_2(2.4542,-.8248),
Point_2(1.7602,.6437),
Point_2(-.2112,1.2975),
Point_2(-1.388,2.0217),
Point_2(-2.7459,1.7602),
Point_2(-3.4399,.9555),
Point_2(-2.2531,.523),
Point_2(-1.388,-.8851),
Point_2(-1.9111,-2.0921),
Point_2(-.2414,-2.6956),
Point_2(.8047,-2.1927),
Point_2(1.901,-1.4283),
Point_2(2.4542,-.8248),
Point_2(2.5983,-.6676)};
/* Next Procedure: load array into vector. */
std::vector<Point_2> star(pts,pts+13);
First off, this is my first C++ project and as usual I have bit off more than I can chew, but that's my style of learning.
Is there any way to pass an array from VB6 to a C++ DLL function? If not is there any way to pass a value that can be used to dimension an array in the function?
I can pass the double values to the function but I cannot create an array to load them into because I have no const value with which to size an array. The DLL works just fine if I hard code the data in the program. When compared to the complexity of the DLL this issue leaves me feeling like I'm Stuck on Stupid. I have included the section of code below.
Thanks in advance for any help.
Ron Becker
/* The Array: Point_2 is a Type. */
Point_2 pts[]={Point_2(2.5849,-1.1012),
Point_2(2.4542,-.8248),
Point_2(1.7602,.6437),
Point_2(-.2112,1.2975),
Point_2(-1.388,2.0217),
Point_2(-2.7459,1.7602),
Point_2(-3.4399,.9555),
Point_2(-2.2531,.523),
Point_2(-1.388,-.8851),
Point_2(-1.9111,-2.0921),
Point_2(-.2414,-2.6956),
Point_2(.8047,-2.1927),
Point_2(1.901,-1.4283),
Point_2(2.4542,-.8248),
Point_2(2.5983,-.6676)};
/* Next Procedure: load array into vector. */
std::vector<Point_2> star(pts,pts+13);